SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Downloaden Sie, um offline zu lesen
WELCOME TO THE
AWS / SERVERLESS WORKSHOP
Mikael Puittinen, CTO
mikael.puittinen@sc5.io
@mpuittinen
1
22.6.2016
A SHORT INTRODUCTION TO SC5
SC5 BRIEFLY
Introducing
CLOUD
SOLUTIONS
BUSINESS
APPLICATIONS
DIGITAL
DESIGN
10
YRS
60+
CUSTOMERS
200+
PROJECTS
HEL
JKL
75
HACKERS
DESIGNERS
6
MEUR
WHY SERVERLESS?
” One of the biggest revolutions we have seen in the technology world in the last
few years is the rise of serverless computing. This has been largely triggered by
the launch of AWS Lambda that no longer requires a server(physical or virtual)
to run application code. This tremendously simplifies application development
as architects only need to think about business logic and no longer need to
worry about managing fleets of servers to run their software. This makes it
easier to achieve the security and reliability to protect their business and their
customers. After all, no server is easier to manage than no server.”
Werner Wogels, CTO / VP at Amazon.com
(https://www.linkedin.com/pulse/simplification-technology-trend-2016-werner-vogels)
A short business case
SC5 & SERVERLESS - BACKGROUND
AWS Lambda released
AWS API Gateway released
First SC5 API Gateway + Lambda project (HappyOrNot webshop)
started 4 days after API Gateway release
JAWS Framework 0.0.1 released
First SC5 Jaws / Serverless project (Gasum Industryhack)
JAWS becomes Serverless Framework
5 customer projects going on, 5 delivered based on AWS
Lambda (9 of which on Serverless)
A bit of history
Nov 2014
July 2015
Sep 2015
Oct 2015
Dec 2015
Today
INTRODUCTION TO AWS
SERVERLESS ARCHITECTURE
AWS SERVERLESS COMPONENTS FOR
WORKSHOP
API Gateway
(API Management)
AWS Lambda
(Compute)
Dynamo
(Database)
AWS LAMBDA
§ Compute service for running code (functions) in AWS
§ Provision resources required by single function run
§ Automatically spawns additional ”instances” if required
§ Invoiced based on actual compute time used (100 ms)
§ Input and output JSON
Serverless Compute
LAMBDA EXAMPLE: CALCULATOR
§ Open AWS Console / Lambda
§ Create new function
§ Name: ”Calculator”
§ Copy code from the right
§ Role: Create new role ”Basic
execution role”
§ Once created, test with e.g.
sample test from the right
§ Logs available in Cloudwatch
exports.handler =
function(event, context) {
console.log('a =', event.a);
console.log('b =', event.b);
context.succeed({
sum: event.a + event.b
});
};
TEST:
{
”a”: 10,
”b”: 20
}
API GATEWAY
§ AWS Service to implement REST (and other) APIs
§ Security via API Keys, customer authorizers
§ Connect to e.g. Lambda to publish your functions as REST
interfaces
§ Input / Output mapping (e.g. URL parameters -> JSON)
§ No need for provisioning
§ Invoicing based on # of requests + data transfer + cache size
Serverless REST API
API GATEWAY EXAMPLE
§ Launch API Gateway from AWS Console
§ Create API ”Calculator”
§ Create resourse ”calculator” (from Actions)
§ Create ”POST” method for calculator resource
§ Integration type: Lambda Function
§ Deploy API to stage ”v1”
§ Copy URL displayed for resource
§ Test API with e.g. Postman
DYNAMODB
§ noSQL database provided by AWS
§ No server instances to manage
§ Provision data read / write
Serverless Database
SERVERLESS FRAMEWORK
” Serverless is the application framework for building web, mobile and
IoT applications exclusively on Amazon Web Services' Lambda and API
Gateway. It's a command line interface that helps you build and
maintain serverless apps across teams of any size. It's also completely
extensible via Plugins. We believe AWS Lambda will be the focal point of
the AWS cloud, and the Serverless Framework interprets AWS from
Lambda's perspective.”
https://github.com/serverless/serverless
THE CHALLENGES
CHALLENGES
1. Guided challenge : Blog backend on serverless
2. Slackbot on serverless
3. Generic HTML form handler on serverless
4. Self-picked challenge
Pick your’s
CHALLENGE: BLOG BACKEND
Create a backend for the blog application running at http://hackathon-blog.serverless.fi/
(sources at https://github.com/SC5/aws-serverless-hackathon)
Backend must have a REST API with methods
1. POST /dev/posts
2. GET /dev/posts
3. PUT /dev/posts/{postId} - OPTIONAL
4. DELETE /dev/posts/{postId} – OPTIONAL
Use e.g. AWS DynamoDB as the database for blog posts.
Step-by-step walkthrough available at http://hackathon.serverless.fi/workshop.pdf
Guided challenge
RESOURCES
Blog client:
https://github.com/SC5/aws-serverless-hackathon
Sample blog backend:
https://github.com/SC5/aws-serverless-hackathon-backend
This presentation:
http://hackathon.serverless.fi/workshop.pdf
GETTING READY FOR THE
WORKSHOP / HACKATHON
PRE-TAKEOFF CHECKLIST (1/3)
q A laptop with Node 4 (recommended), 5 or 6 installed
q An AWS account (https://aws.amazon.com/free)
A credit card is required although no charges should occur from this workshop
q AWS CLI (optional)
(http://docs.aws.amazon.com/cli/latest/userguide/installing.html OR
”brew install awscli” for OSX homebrew users)
Getting prepared
PREPARE AWS IAM USER FOR HACKATHON
1. Log in to AWS
2. Go to Services -> Identity and Access Management
3. Create a new user (take note of the access key + secret). Note: a
credit / debit card is required.
4. Click on the new user and select the ”Permissions” tab
5. Attach the ”Administrator access” policy to the user
Note: In real life scenarios, you would not assign administrator
pirivileges but more finegrain permissions.
SETTING UP AWS CREDENTIALS ON LAPTOP
AWS CLI INSTALLED
> aws configure
Enter access key / secret
provided to IAM user.
Default region: eu-central-1
Default output: json
AWS CLI NOT INSTALLED
Create following files with following
info. No Windows filename suffixes!
~/.aws/config
[default]
region = eu-west-1
output = json
~/.aws/credentials
[default]
aws_access_key_id = AKIAI***
aws_secret_access_key = ****
TESTING THE SETUP
> mkdir awstest
> cd awstest
> npm install aws-sdk
Create awstest.js based on right
frame
> node awstest.js
You should get your IAM account
name as a response if set up
correctly.
awstest.js:
var AWS=require('aws-sdk');
var IAM = new AWS.IAM();
IAM.getUser(function(err, data) {
console.log(data.User.UserName)
});
INSTALL SERVERLESS
Install the serverless framework globally in order to be able to use the
serverless CLI to initiate new projects
> npm install -g serverless
SERVERLESS BLOG WALKTROUGH
INSTRUCTIONS
When copying JSON / other from presentation, beware of additional
whitespaces. Some editors seem to add whitespaces during copy /
paste.
Use the source files from github in case you run into issues.
1. CREATE SERVERLESS PROJECT
> sls project install –n "serverless-blog" sc5-serverless-boilerplate
> cd serverless-blog
> npm install
This creates a new project serverless-blog based on sc5-serverless-
boilerplate and installs the node modules required by the project.
2. CREATE DYNAMODB TABLE FOR POSTS (USING
SERVERLESS)
q Serverless uses AWS
Cloudformation to deploy
resources (deined in s-resources-
cf.json)
q Add snippet on the right to
”Resources” in s-resources-
cf.json
q Deploy with
> sls resources deploy
Permissions to the table are granted
by default in the boilerplate template.
"BlogTable": {
"Type": "AWS::DynamoDB::Table",
"DeletionPolicy": "Retain",
"Properties": {
"AttributeDefinitions": [ {
"AttributeName": "id",
"AttributeType": "S"
} ],
"KeySchema": [ {
"AttributeName": "id",
"KeyType": "HASH"
} ],
"ProvisionedThroughput": {
"ReadCapacityUnits": 1,
"WriteCapacityUnits": 1
},
"TableName": "${stage}-${project}-blog"
}
}
Sample: https://github.com/SC5/aws-serverless-hackathon-backend/blob/master/s-resources-cf.json
3. CREATE FUNCTION AND SET ENDPOINTS
> sls function create blog/posts
§ Select ”nodejs4.3” as your runtime and ”Create Endpoint”
§ In blog/posts/s-function.json, you will find an endpoint for GET in ”endpoints”
§ Create additional endpoints for POST, PUT, DELETE (using the plugin serverless-endpoint-helper)
> sls endpoint create posts posts POST
> sls endpoint create posts posts/{id} DELETE
> sls endpoint create posts posts/{id} PUT
§ Set ”RequestTemplates” (replace the object by a string) for the endpoints to ”$${restGet}” ,
”$${restPost}”, ”$${restPut}” and ”$${restDelete}”. These are mappings defined in s-
template.json.
§ See s-template.json and restPutand restDelete templates to see how the id is retrieved from the
path parameter is used.
Sample: https://github.com/SC5/aws-serverless-hackathon-backend/blob/master/blog/posts/s-function.json
4. ENABLE CORS HEADERS FOR ENDPOINTS
q CORS headers need to be
enabled so that the
application can access the
endpoints
q To add CORS headers, add
snippet on the right to
”custom” in blog/posts/s-
function.json
"cors": {
"allowOrigin": "*",
"allowHeaders": [
"Content-Type",
"X-Amz-Date",
"Authorization",
"X-Api-Key"
]
}
Sample: https://github.com/SC5/aws-serverless-hackathon-backend/blob/master/blog/posts/s-function.json
5. IMPLEMENT THE LOGIC
§ Implement the logic for the function into blog/posts. The entry
point for the Lambda function is handler.js in that folder.
§ Copy the files handler.js and blog_storage.js from github
(unless you want to code them yourself)
§ Use e.g. AWS.DynamoDB.DocumentClient to access the database
table. The table name is ${process.env.SERVERLESS_STAGE}-
${process.env.SERVERLESS_PROJECT}-blog
Samples: https://github.com/SC5/aws-serverless-hackathon-backend/blob/master/blog/posts/handler.js
https://github.com/SC5/aws-serverless-hackathon-backend/blob/master/blog/posts/blog_storage.js
6. TEST THE FUNCTION
q sls function run can be
used to run the function with the
input defined in event.json
q Copy the snippet on the right to
blog/posts/event.json and
run
> sls function run
q NOTE: sls-mocha-plugin is
included in the boilerplate to
support more advanced TDD
{
"method": "POST",
"body": {
"title": "Test post",
"content" : "Test content"
}
}
Sample: https://github.com/SC5/aws-serverless-hackathon-backend/blob/master/blog/posts/event.json
7. DEPLOY FUNCTIONS & ENDPOINTS
> sls function deploy posts
> sls endpoint deploy --all
This deploys the functions and endpoinst (including CORS headers).
sls dash deploy does not (currently) deploy the CORS headers.
You will get the URLs for the endpoints as response to endpoint
deploy
8. SET UP ENDPOINTS IN THE SAMPLE APP
q Launch the blog application at
http://hackathon-blog.serverless.fi
q Enter the endpoint URL (https://…/dev/posts) to the form and
save
q Try writing, editing, deleting posts
9. YOU DID IT! CONGRATS!
Next:
1. If you want to work more on serverless, check opportunities at
https://sc5.io/careers
2. If you are in the Helsinki Area and interested in serverless, join the
”Helsinki Serverless” meetup at
http://www.meetup.com/Helsinki-Serverless/
THANK YOU!
mikael.puittinen@sc5.io
@mpuittinen

Weitere ähnliche Inhalte

Was ist angesagt?

Building Automated Control Systems for Your AWS Infrastructure
Building Automated Control Systems for Your AWS InfrastructureBuilding Automated Control Systems for Your AWS Infrastructure
Building Automated Control Systems for Your AWS InfrastructureAmazon Web Services
 
Using AWS Lambda to Build Control Systems for Your AWS Infrastructure
Using AWS Lambda to Build Control Systems for Your AWS InfrastructureUsing AWS Lambda to Build Control Systems for Your AWS Infrastructure
Using AWS Lambda to Build Control Systems for Your AWS InfrastructureAmazon Web Services
 
Let's Talk About Serverless - Focusing on AWS Lambda
Let's Talk About Serverless - Focusing on AWS LambdaLet's Talk About Serverless - Focusing on AWS Lambda
Let's Talk About Serverless - Focusing on AWS LambdaOkis Chuang
 
Getting Started with Docker on AWS
Getting Started with Docker on AWSGetting Started with Docker on AWS
Getting Started with Docker on AWSAmazon Web Services
 
AWS Serverless Introduction (Lambda)
AWS Serverless Introduction (Lambda)AWS Serverless Introduction (Lambda)
AWS Serverless Introduction (Lambda)Ashish Kushwaha
 
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar SeriesDeep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar SeriesAmazon Web Services
 
Grow and Retain Users with Analytics and Push Notifications
Grow and Retain Users with Analytics and Push NotificationsGrow and Retain Users with Analytics and Push Notifications
Grow and Retain Users with Analytics and Push NotificationsAmazon Web Services
 
Continuous Delivery with AWS Lambda - AWS April 2016 Webinar Series
Continuous Delivery with AWS Lambda - AWS April 2016 Webinar SeriesContinuous Delivery with AWS Lambda - AWS April 2016 Webinar Series
Continuous Delivery with AWS Lambda - AWS April 2016 Webinar SeriesAmazon Web Services
 
Build a Text Enabled Keg-orator Robot with Alexa, AWS IoT & AWS Lambda
Build a Text Enabled Keg-orator Robot with Alexa, AWS IoT & AWS LambdaBuild a Text Enabled Keg-orator Robot with Alexa, AWS IoT & AWS Lambda
Build a Text Enabled Keg-orator Robot with Alexa, AWS IoT & AWS LambdaAmazon Web Services
 
Microservice Architecture on AWS using AWS Lambda and Docker Containers
Microservice Architecture on AWS using AWS Lambda and Docker ContainersMicroservice Architecture on AWS using AWS Lambda and Docker Containers
Microservice Architecture on AWS using AWS Lambda and Docker ContainersDanilo Poccia
 
AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...
AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...
AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...Amazon Web Services
 
Accelerating DevOps Pipelines with AWS
Accelerating DevOps Pipelines with AWS Accelerating DevOps Pipelines with AWS
Accelerating DevOps Pipelines with AWS Amazon Web Services
 
Building Serverless Backends with AWS Lambda and Amazon API Gateway
Building Serverless Backends with AWS Lambda and Amazon API GatewayBuilding Serverless Backends with AWS Lambda and Amazon API Gateway
Building Serverless Backends with AWS Lambda and Amazon API GatewayAmazon Web Services
 
Build a Server-less Event-driven Backend with AWS Lambda and Amazon API Gateway
Build a Server-less Event-driven Backend with AWS Lambda and Amazon API GatewayBuild a Server-less Event-driven Backend with AWS Lambda and Amazon API Gateway
Build a Server-less Event-driven Backend with AWS Lambda and Amazon API GatewayDanilo Poccia
 
Serverless computing with AWS Lambda
Serverless computing with AWS Lambda Serverless computing with AWS Lambda
Serverless computing with AWS Lambda Apigee | Google Cloud
 
Accelerating DevOps Pipelines with AWS
Accelerating DevOps Pipelines with AWSAccelerating DevOps Pipelines with AWS
Accelerating DevOps Pipelines with AWSAmazon Web Services
 

Was ist angesagt? (20)

Building Automated Control Systems for Your AWS Infrastructure
Building Automated Control Systems for Your AWS InfrastructureBuilding Automated Control Systems for Your AWS Infrastructure
Building Automated Control Systems for Your AWS Infrastructure
 
Using AWS Lambda to Build Control Systems for Your AWS Infrastructure
Using AWS Lambda to Build Control Systems for Your AWS InfrastructureUsing AWS Lambda to Build Control Systems for Your AWS Infrastructure
Using AWS Lambda to Build Control Systems for Your AWS Infrastructure
 
Let's Talk About Serverless - Focusing on AWS Lambda
Let's Talk About Serverless - Focusing on AWS LambdaLet's Talk About Serverless - Focusing on AWS Lambda
Let's Talk About Serverless - Focusing on AWS Lambda
 
Getting Started with Docker on AWS
Getting Started with Docker on AWSGetting Started with Docker on AWS
Getting Started with Docker on AWS
 
AWS Serverless Introduction (Lambda)
AWS Serverless Introduction (Lambda)AWS Serverless Introduction (Lambda)
AWS Serverless Introduction (Lambda)
 
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar SeriesDeep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
 
Grow and Retain Users with Analytics and Push Notifications
Grow and Retain Users with Analytics and Push NotificationsGrow and Retain Users with Analytics and Push Notifications
Grow and Retain Users with Analytics and Push Notifications
 
Continuous Delivery with AWS Lambda - AWS April 2016 Webinar Series
Continuous Delivery with AWS Lambda - AWS April 2016 Webinar SeriesContinuous Delivery with AWS Lambda - AWS April 2016 Webinar Series
Continuous Delivery with AWS Lambda - AWS April 2016 Webinar Series
 
Deep Dive: AWS Lambda
Deep Dive: AWS LambdaDeep Dive: AWS Lambda
Deep Dive: AWS Lambda
 
Build a Text Enabled Keg-orator Robot with Alexa, AWS IoT & AWS Lambda
Build a Text Enabled Keg-orator Robot with Alexa, AWS IoT & AWS LambdaBuild a Text Enabled Keg-orator Robot with Alexa, AWS IoT & AWS Lambda
Build a Text Enabled Keg-orator Robot with Alexa, AWS IoT & AWS Lambda
 
Microservice Architecture on AWS using AWS Lambda and Docker Containers
Microservice Architecture on AWS using AWS Lambda and Docker ContainersMicroservice Architecture on AWS using AWS Lambda and Docker Containers
Microservice Architecture on AWS using AWS Lambda and Docker Containers
 
AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...
AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...
AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...
 
Accelerating DevOps Pipelines with AWS
Accelerating DevOps Pipelines with AWS Accelerating DevOps Pipelines with AWS
Accelerating DevOps Pipelines with AWS
 
Amazon API Gateway
Amazon API GatewayAmazon API Gateway
Amazon API Gateway
 
Serverless Architecture
Serverless ArchitectureServerless Architecture
Serverless Architecture
 
Building Serverless Backends with AWS Lambda and Amazon API Gateway
Building Serverless Backends with AWS Lambda and Amazon API GatewayBuilding Serverless Backends with AWS Lambda and Amazon API Gateway
Building Serverless Backends with AWS Lambda and Amazon API Gateway
 
Build a Server-less Event-driven Backend with AWS Lambda and Amazon API Gateway
Build a Server-less Event-driven Backend with AWS Lambda and Amazon API GatewayBuild a Server-less Event-driven Backend with AWS Lambda and Amazon API Gateway
Build a Server-less Event-driven Backend with AWS Lambda and Amazon API Gateway
 
Serverless computing with AWS Lambda
Serverless computing with AWS Lambda Serverless computing with AWS Lambda
Serverless computing with AWS Lambda
 
AWS Lambda
AWS LambdaAWS Lambda
AWS Lambda
 
Accelerating DevOps Pipelines with AWS
Accelerating DevOps Pipelines with AWSAccelerating DevOps Pipelines with AWS
Accelerating DevOps Pipelines with AWS
 

Andere mochten auch

AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...
AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...
AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...Amazon Web Services
 
Leveraging Cloud and APIs as a Platform for Innovation
Leveraging Cloud and APIs as a Platform for InnovationLeveraging Cloud and APIs as a Platform for Innovation
Leveraging Cloud and APIs as a Platform for InnovationMikael Puittinen
 
Leveraging the Security of AWS's Own APIs for Your App - AWS Serverless Web Day
Leveraging the Security of AWS's Own APIs for Your App - AWS Serverless Web DayLeveraging the Security of AWS's Own APIs for Your App - AWS Serverless Web Day
Leveraging the Security of AWS's Own APIs for Your App - AWS Serverless Web DayAWS Germany
 
Securing Serverless Architectures - AWS Serverless Web Day
Securing Serverless Architectures - AWS Serverless Web DaySecuring Serverless Architectures - AWS Serverless Web Day
Securing Serverless Architectures - AWS Serverless Web DayAWS Germany
 
Vorontsov, golovko ssrf attacks and sockets. smorgasbord of vulnerabilities
Vorontsov, golovko   ssrf attacks and sockets. smorgasbord of vulnerabilitiesVorontsov, golovko   ssrf attacks and sockets. smorgasbord of vulnerabilities
Vorontsov, golovko ssrf attacks and sockets. smorgasbord of vulnerabilitiesDefconRussia
 
Security Boundaries and Functions of Services for Serverless Architectures on...
Security Boundaries and Functions of Services for Serverless Architectures on...Security Boundaries and Functions of Services for Serverless Architectures on...
Security Boundaries and Functions of Services for Serverless Architectures on...AWS Germany
 
Morning Session - AWS Serverless Ways
Morning Session - AWS Serverless WaysMorning Session - AWS Serverless Ways
Morning Session - AWS Serverless Waysakitsukada
 
Serverless Frameworks on AWS
Serverless Frameworks on AWSServerless Frameworks on AWS
Serverless Frameworks on AWSJulien SIMON
 
AWS IoT Button and Lambda to power a blockchain project - AWS Serverless Web Day
AWS IoT Button and Lambda to power a blockchain project - AWS Serverless Web DayAWS IoT Button and Lambda to power a blockchain project - AWS Serverless Web Day
AWS IoT Button and Lambda to power a blockchain project - AWS Serverless Web DayAWS Germany
 
Serverless Patterns: “No server is easier to manage than no server” - AWS Sec...
Serverless Patterns: “No server is easier to manage than no server” - AWS Sec...Serverless Patterns: “No server is easier to manage than no server” - AWS Sec...
Serverless Patterns: “No server is easier to manage than no server” - AWS Sec...Amazon Web Services
 
Leveraging Social Media: Call 4
Leveraging Social Media: Call 4Leveraging Social Media: Call 4
Leveraging Social Media: Call 4Beth Kanter
 
Tabela 1 i 2
Tabela 1 i 2Tabela 1 i 2
Tabela 1 i 2ptwp
 
Cynthia Caceres Research Journal Article
Cynthia Caceres Research Journal ArticleCynthia Caceres Research Journal Article
Cynthia Caceres Research Journal ArticleCynthia Caceres
 
822 tnda karen
822 tnda karen822 tnda karen
822 tnda karencmiguel7
 
Apresentação denken português 2.0
Apresentação denken português 2.0Apresentação denken português 2.0
Apresentação denken português 2.0Isaias Santana
 
Beautiful Quotes To Live By
Beautiful Quotes To Live ByBeautiful Quotes To Live By
Beautiful Quotes To Live Byhimanianand89
 
Preliminary Study of Indoor Ultrawideband Localization for At-Home Patient Mo...
Preliminary Study of Indoor Ultrawideband Localization for At-Home Patient Mo...Preliminary Study of Indoor Ultrawideband Localization for At-Home Patient Mo...
Preliminary Study of Indoor Ultrawideband Localization for At-Home Patient Mo...specialbaek
 
Adaptive marketing
Adaptive marketingAdaptive marketing
Adaptive marketingPromodo
 

Andere mochten auch (20)

AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...
AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...
AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...
 
Leveraging Cloud and APIs as a Platform for Innovation
Leveraging Cloud and APIs as a Platform for InnovationLeveraging Cloud and APIs as a Platform for Innovation
Leveraging Cloud and APIs as a Platform for Innovation
 
Leveraging the Security of AWS's Own APIs for Your App - AWS Serverless Web Day
Leveraging the Security of AWS's Own APIs for Your App - AWS Serverless Web DayLeveraging the Security of AWS's Own APIs for Your App - AWS Serverless Web Day
Leveraging the Security of AWS's Own APIs for Your App - AWS Serverless Web Day
 
Securing Serverless Architectures - AWS Serverless Web Day
Securing Serverless Architectures - AWS Serverless Web DaySecuring Serverless Architectures - AWS Serverless Web Day
Securing Serverless Architectures - AWS Serverless Web Day
 
Vorontsov, golovko ssrf attacks and sockets. smorgasbord of vulnerabilities
Vorontsov, golovko   ssrf attacks and sockets. smorgasbord of vulnerabilitiesVorontsov, golovko   ssrf attacks and sockets. smorgasbord of vulnerabilities
Vorontsov, golovko ssrf attacks and sockets. smorgasbord of vulnerabilities
 
Security Boundaries and Functions of Services for Serverless Architectures on...
Security Boundaries and Functions of Services for Serverless Architectures on...Security Boundaries and Functions of Services for Serverless Architectures on...
Security Boundaries and Functions of Services for Serverless Architectures on...
 
Morning Session - AWS Serverless Ways
Morning Session - AWS Serverless WaysMorning Session - AWS Serverless Ways
Morning Session - AWS Serverless Ways
 
Serverless Frameworks on AWS
Serverless Frameworks on AWSServerless Frameworks on AWS
Serverless Frameworks on AWS
 
AWS IoT Button and Lambda to power a blockchain project - AWS Serverless Web Day
AWS IoT Button and Lambda to power a blockchain project - AWS Serverless Web DayAWS IoT Button and Lambda to power a blockchain project - AWS Serverless Web Day
AWS IoT Button and Lambda to power a blockchain project - AWS Serverless Web Day
 
Serverless Patterns: “No server is easier to manage than no server” - AWS Sec...
Serverless Patterns: “No server is easier to manage than no server” - AWS Sec...Serverless Patterns: “No server is easier to manage than no server” - AWS Sec...
Serverless Patterns: “No server is easier to manage than no server” - AWS Sec...
 
Leveraging Social Media: Call 4
Leveraging Social Media: Call 4Leveraging Social Media: Call 4
Leveraging Social Media: Call 4
 
Tabela 1 i 2
Tabela 1 i 2Tabela 1 i 2
Tabela 1 i 2
 
Cynthia Caceres Research Journal Article
Cynthia Caceres Research Journal ArticleCynthia Caceres Research Journal Article
Cynthia Caceres Research Journal Article
 
822 tnda karen
822 tnda karen822 tnda karen
822 tnda karen
 
Apresentação denken português 2.0
Apresentação denken português 2.0Apresentação denken português 2.0
Apresentação denken português 2.0
 
Beautiful Quotes To Live By
Beautiful Quotes To Live ByBeautiful Quotes To Live By
Beautiful Quotes To Live By
 
Blue Ocean Strategy 3573
Blue Ocean Strategy 3573Blue Ocean Strategy 3573
Blue Ocean Strategy 3573
 
Preliminary Study of Indoor Ultrawideband Localization for At-Home Patient Mo...
Preliminary Study of Indoor Ultrawideband Localization for At-Home Patient Mo...Preliminary Study of Indoor Ultrawideband Localization for At-Home Patient Mo...
Preliminary Study of Indoor Ultrawideband Localization for At-Home Patient Mo...
 
Adaptive marketing
Adaptive marketingAdaptive marketing
Adaptive marketing
 
Financing Demographic Shifts Scenarios
 Financing Demographic Shifts   Scenarios Financing Demographic Shifts   Scenarios
Financing Demographic Shifts Scenarios
 

Ähnlich wie AWS Serverless Workshop

AWS Presents: Infrastructure as Code on AWS - ChefConf 2015
AWS Presents: Infrastructure as Code on AWS - ChefConf 2015AWS Presents: Infrastructure as Code on AWS - ChefConf 2015
AWS Presents: Infrastructure as Code on AWS - ChefConf 2015Chef
 
Developing and deploying serverless applications (February 2017)
Developing and deploying serverless applications (February 2017)Developing and deploying serverless applications (February 2017)
Developing and deploying serverless applications (February 2017)Julien SIMON
 
Building Serverless APIs on AWS
Building Serverless APIs on AWSBuilding Serverless APIs on AWS
Building Serverless APIs on AWSJulien SIMON
 
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
 Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbsAWS Chicago
 
An introduction to serverless architectures (February 2017)
An introduction to serverless architectures (February 2017)An introduction to serverless architectures (February 2017)
An introduction to serverless architectures (February 2017)Julien SIMON
 
"Automating AWS Infrastructure with PowerShell", Martin Beeby, AWS Dev Day Ky...
"Automating AWS Infrastructure with PowerShell", Martin Beeby, AWS Dev Day Ky..."Automating AWS Infrastructure with PowerShell", Martin Beeby, AWS Dev Day Ky...
"Automating AWS Infrastructure with PowerShell", Martin Beeby, AWS Dev Day Ky...Provectus
 
DevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office HoursDevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office HoursAmazon Web Services
 
AWS for Startups, London - Programming AWS
AWS for Startups, London - Programming AWSAWS for Startups, London - Programming AWS
AWS for Startups, London - Programming AWSAmazon Web Services
 
Integrating Jira Software Cloud With the AWS Code Suite
Integrating Jira Software Cloud With the AWS Code SuiteIntegrating Jira Software Cloud With the AWS Code Suite
Integrating Jira Software Cloud With the AWS Code SuiteAtlassian
 
Application Lifecycle Management in a Serverless World
Application Lifecycle Management in a Serverless WorldApplication Lifecycle Management in a Serverless World
Application Lifecycle Management in a Serverless WorldAmazon Web Services
 
Serverless cat detector workshop - cloudyna 2017 (16.12.2017)
Serverless cat detector   workshop - cloudyna 2017 (16.12.2017)Serverless cat detector   workshop - cloudyna 2017 (16.12.2017)
Serverless cat detector workshop - cloudyna 2017 (16.12.2017)Paweł Pikuła
 
Building serverless applications (April 2018)
Building serverless applications (April 2018)Building serverless applications (April 2018)
Building serverless applications (April 2018)Julien SIMON
 
Serverless archtiectures
Serverless archtiecturesServerless archtiectures
Serverless archtiecturesIegor Fadieiev
 
AWS re:Invent 2016: Deploying and Managing .NET Pipelines and Microsoft Workl...
AWS re:Invent 2016: Deploying and Managing .NET Pipelines and Microsoft Workl...AWS re:Invent 2016: Deploying and Managing .NET Pipelines and Microsoft Workl...
AWS re:Invent 2016: Deploying and Managing .NET Pipelines and Microsoft Workl...Amazon Web Services
 
Into The Box | Alexa and ColdBox Api's
Into The Box | Alexa and ColdBox Api'sInto The Box | Alexa and ColdBox Api's
Into The Box | Alexa and ColdBox Api'sOrtus Solutions, Corp
 
Continuous Integration e Delivery per (r)innovare lo sviluppo software e la g...
Continuous Integration e Delivery per (r)innovare lo sviluppo software e la g...Continuous Integration e Delivery per (r)innovare lo sviluppo software e la g...
Continuous Integration e Delivery per (r)innovare lo sviluppo software e la g...Amazon Web Services
 
AWS Lambda with Serverless Framework and Java
AWS Lambda with Serverless Framework and JavaAWS Lambda with Serverless Framework and Java
AWS Lambda with Serverless Framework and JavaManish Pandit
 

Ähnlich wie AWS Serverless Workshop (20)

AWS Presents: Infrastructure as Code on AWS - ChefConf 2015
AWS Presents: Infrastructure as Code on AWS - ChefConf 2015AWS Presents: Infrastructure as Code on AWS - ChefConf 2015
AWS Presents: Infrastructure as Code on AWS - ChefConf 2015
 
Developing and deploying serverless applications (February 2017)
Developing and deploying serverless applications (February 2017)Developing and deploying serverless applications (February 2017)
Developing and deploying serverless applications (February 2017)
 
Building Serverless APIs on AWS
Building Serverless APIs on AWSBuilding Serverless APIs on AWS
Building Serverless APIs on AWS
 
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
 Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
 
An introduction to serverless architectures (February 2017)
An introduction to serverless architectures (February 2017)An introduction to serverless architectures (February 2017)
An introduction to serverless architectures (February 2017)
 
"Automating AWS Infrastructure with PowerShell", Martin Beeby, AWS Dev Day Ky...
"Automating AWS Infrastructure with PowerShell", Martin Beeby, AWS Dev Day Ky..."Automating AWS Infrastructure with PowerShell", Martin Beeby, AWS Dev Day Ky...
"Automating AWS Infrastructure with PowerShell", Martin Beeby, AWS Dev Day Ky...
 
DevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office HoursDevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office Hours
 
AWS for Startups, London - Programming AWS
AWS for Startups, London - Programming AWSAWS for Startups, London - Programming AWS
AWS for Startups, London - Programming AWS
 
Integrating Jira Software Cloud With the AWS Code Suite
Integrating Jira Software Cloud With the AWS Code SuiteIntegrating Jira Software Cloud With the AWS Code Suite
Integrating Jira Software Cloud With the AWS Code Suite
 
Application Lifecycle Management in a Serverless World
Application Lifecycle Management in a Serverless WorldApplication Lifecycle Management in a Serverless World
Application Lifecycle Management in a Serverless World
 
Deep Dive on Serverless Stack
Deep Dive on Serverless StackDeep Dive on Serverless Stack
Deep Dive on Serverless Stack
 
Serverless cat detector workshop - cloudyna 2017 (16.12.2017)
Serverless cat detector   workshop - cloudyna 2017 (16.12.2017)Serverless cat detector   workshop - cloudyna 2017 (16.12.2017)
Serverless cat detector workshop - cloudyna 2017 (16.12.2017)
 
Building serverless applications (April 2018)
Building serverless applications (April 2018)Building serverless applications (April 2018)
Building serverless applications (April 2018)
 
Aws cli
Aws cliAws cli
Aws cli
 
Aws cli
Aws cliAws cli
Aws cli
 
Serverless archtiectures
Serverless archtiecturesServerless archtiectures
Serverless archtiectures
 
AWS re:Invent 2016: Deploying and Managing .NET Pipelines and Microsoft Workl...
AWS re:Invent 2016: Deploying and Managing .NET Pipelines and Microsoft Workl...AWS re:Invent 2016: Deploying and Managing .NET Pipelines and Microsoft Workl...
AWS re:Invent 2016: Deploying and Managing .NET Pipelines and Microsoft Workl...
 
Into The Box | Alexa and ColdBox Api's
Into The Box | Alexa and ColdBox Api'sInto The Box | Alexa and ColdBox Api's
Into The Box | Alexa and ColdBox Api's
 
Continuous Integration e Delivery per (r)innovare lo sviluppo software e la g...
Continuous Integration e Delivery per (r)innovare lo sviluppo software e la g...Continuous Integration e Delivery per (r)innovare lo sviluppo software e la g...
Continuous Integration e Delivery per (r)innovare lo sviluppo software e la g...
 
AWS Lambda with Serverless Framework and Java
AWS Lambda with Serverless Framework and JavaAWS Lambda with Serverless Framework and Java
AWS Lambda with Serverless Framework and Java
 

Kürzlich hochgeladen

React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 

Kürzlich hochgeladen (20)

React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 

AWS Serverless Workshop

  • 1. WELCOME TO THE AWS / SERVERLESS WORKSHOP Mikael Puittinen, CTO mikael.puittinen@sc5.io @mpuittinen 1 22.6.2016
  • 4. WHY SERVERLESS? ” One of the biggest revolutions we have seen in the technology world in the last few years is the rise of serverless computing. This has been largely triggered by the launch of AWS Lambda that no longer requires a server(physical or virtual) to run application code. This tremendously simplifies application development as architects only need to think about business logic and no longer need to worry about managing fleets of servers to run their software. This makes it easier to achieve the security and reliability to protect their business and their customers. After all, no server is easier to manage than no server.” Werner Wogels, CTO / VP at Amazon.com (https://www.linkedin.com/pulse/simplification-technology-trend-2016-werner-vogels) A short business case
  • 5. SC5 & SERVERLESS - BACKGROUND AWS Lambda released AWS API Gateway released First SC5 API Gateway + Lambda project (HappyOrNot webshop) started 4 days after API Gateway release JAWS Framework 0.0.1 released First SC5 Jaws / Serverless project (Gasum Industryhack) JAWS becomes Serverless Framework 5 customer projects going on, 5 delivered based on AWS Lambda (9 of which on Serverless) A bit of history Nov 2014 July 2015 Sep 2015 Oct 2015 Dec 2015 Today
  • 7. AWS SERVERLESS COMPONENTS FOR WORKSHOP API Gateway (API Management) AWS Lambda (Compute) Dynamo (Database)
  • 8. AWS LAMBDA § Compute service for running code (functions) in AWS § Provision resources required by single function run § Automatically spawns additional ”instances” if required § Invoiced based on actual compute time used (100 ms) § Input and output JSON Serverless Compute
  • 9. LAMBDA EXAMPLE: CALCULATOR § Open AWS Console / Lambda § Create new function § Name: ”Calculator” § Copy code from the right § Role: Create new role ”Basic execution role” § Once created, test with e.g. sample test from the right § Logs available in Cloudwatch exports.handler = function(event, context) { console.log('a =', event.a); console.log('b =', event.b); context.succeed({ sum: event.a + event.b }); }; TEST: { ”a”: 10, ”b”: 20 }
  • 10. API GATEWAY § AWS Service to implement REST (and other) APIs § Security via API Keys, customer authorizers § Connect to e.g. Lambda to publish your functions as REST interfaces § Input / Output mapping (e.g. URL parameters -> JSON) § No need for provisioning § Invoicing based on # of requests + data transfer + cache size Serverless REST API
  • 11. API GATEWAY EXAMPLE § Launch API Gateway from AWS Console § Create API ”Calculator” § Create resourse ”calculator” (from Actions) § Create ”POST” method for calculator resource § Integration type: Lambda Function § Deploy API to stage ”v1” § Copy URL displayed for resource § Test API with e.g. Postman
  • 12. DYNAMODB § noSQL database provided by AWS § No server instances to manage § Provision data read / write Serverless Database
  • 13. SERVERLESS FRAMEWORK ” Serverless is the application framework for building web, mobile and IoT applications exclusively on Amazon Web Services' Lambda and API Gateway. It's a command line interface that helps you build and maintain serverless apps across teams of any size. It's also completely extensible via Plugins. We believe AWS Lambda will be the focal point of the AWS cloud, and the Serverless Framework interprets AWS from Lambda's perspective.” https://github.com/serverless/serverless
  • 15. CHALLENGES 1. Guided challenge : Blog backend on serverless 2. Slackbot on serverless 3. Generic HTML form handler on serverless 4. Self-picked challenge Pick your’s
  • 16. CHALLENGE: BLOG BACKEND Create a backend for the blog application running at http://hackathon-blog.serverless.fi/ (sources at https://github.com/SC5/aws-serverless-hackathon) Backend must have a REST API with methods 1. POST /dev/posts 2. GET /dev/posts 3. PUT /dev/posts/{postId} - OPTIONAL 4. DELETE /dev/posts/{postId} – OPTIONAL Use e.g. AWS DynamoDB as the database for blog posts. Step-by-step walkthrough available at http://hackathon.serverless.fi/workshop.pdf Guided challenge
  • 17. RESOURCES Blog client: https://github.com/SC5/aws-serverless-hackathon Sample blog backend: https://github.com/SC5/aws-serverless-hackathon-backend This presentation: http://hackathon.serverless.fi/workshop.pdf
  • 18. GETTING READY FOR THE WORKSHOP / HACKATHON
  • 19. PRE-TAKEOFF CHECKLIST (1/3) q A laptop with Node 4 (recommended), 5 or 6 installed q An AWS account (https://aws.amazon.com/free) A credit card is required although no charges should occur from this workshop q AWS CLI (optional) (http://docs.aws.amazon.com/cli/latest/userguide/installing.html OR ”brew install awscli” for OSX homebrew users) Getting prepared
  • 20. PREPARE AWS IAM USER FOR HACKATHON 1. Log in to AWS 2. Go to Services -> Identity and Access Management 3. Create a new user (take note of the access key + secret). Note: a credit / debit card is required. 4. Click on the new user and select the ”Permissions” tab 5. Attach the ”Administrator access” policy to the user Note: In real life scenarios, you would not assign administrator pirivileges but more finegrain permissions.
  • 21. SETTING UP AWS CREDENTIALS ON LAPTOP AWS CLI INSTALLED > aws configure Enter access key / secret provided to IAM user. Default region: eu-central-1 Default output: json AWS CLI NOT INSTALLED Create following files with following info. No Windows filename suffixes! ~/.aws/config [default] region = eu-west-1 output = json ~/.aws/credentials [default] aws_access_key_id = AKIAI*** aws_secret_access_key = ****
  • 22. TESTING THE SETUP > mkdir awstest > cd awstest > npm install aws-sdk Create awstest.js based on right frame > node awstest.js You should get your IAM account name as a response if set up correctly. awstest.js: var AWS=require('aws-sdk'); var IAM = new AWS.IAM(); IAM.getUser(function(err, data) { console.log(data.User.UserName) });
  • 23. INSTALL SERVERLESS Install the serverless framework globally in order to be able to use the serverless CLI to initiate new projects > npm install -g serverless
  • 25. INSTRUCTIONS When copying JSON / other from presentation, beware of additional whitespaces. Some editors seem to add whitespaces during copy / paste. Use the source files from github in case you run into issues.
  • 26. 1. CREATE SERVERLESS PROJECT > sls project install –n "serverless-blog" sc5-serverless-boilerplate > cd serverless-blog > npm install This creates a new project serverless-blog based on sc5-serverless- boilerplate and installs the node modules required by the project.
  • 27. 2. CREATE DYNAMODB TABLE FOR POSTS (USING SERVERLESS) q Serverless uses AWS Cloudformation to deploy resources (deined in s-resources- cf.json) q Add snippet on the right to ”Resources” in s-resources- cf.json q Deploy with > sls resources deploy Permissions to the table are granted by default in the boilerplate template. "BlogTable": { "Type": "AWS::DynamoDB::Table", "DeletionPolicy": "Retain", "Properties": { "AttributeDefinitions": [ { "AttributeName": "id", "AttributeType": "S" } ], "KeySchema": [ { "AttributeName": "id", "KeyType": "HASH" } ], "ProvisionedThroughput": { "ReadCapacityUnits": 1, "WriteCapacityUnits": 1 }, "TableName": "${stage}-${project}-blog" } } Sample: https://github.com/SC5/aws-serverless-hackathon-backend/blob/master/s-resources-cf.json
  • 28. 3. CREATE FUNCTION AND SET ENDPOINTS > sls function create blog/posts § Select ”nodejs4.3” as your runtime and ”Create Endpoint” § In blog/posts/s-function.json, you will find an endpoint for GET in ”endpoints” § Create additional endpoints for POST, PUT, DELETE (using the plugin serverless-endpoint-helper) > sls endpoint create posts posts POST > sls endpoint create posts posts/{id} DELETE > sls endpoint create posts posts/{id} PUT § Set ”RequestTemplates” (replace the object by a string) for the endpoints to ”$${restGet}” , ”$${restPost}”, ”$${restPut}” and ”$${restDelete}”. These are mappings defined in s- template.json. § See s-template.json and restPutand restDelete templates to see how the id is retrieved from the path parameter is used. Sample: https://github.com/SC5/aws-serverless-hackathon-backend/blob/master/blog/posts/s-function.json
  • 29. 4. ENABLE CORS HEADERS FOR ENDPOINTS q CORS headers need to be enabled so that the application can access the endpoints q To add CORS headers, add snippet on the right to ”custom” in blog/posts/s- function.json "cors": { "allowOrigin": "*", "allowHeaders": [ "Content-Type", "X-Amz-Date", "Authorization", "X-Api-Key" ] } Sample: https://github.com/SC5/aws-serverless-hackathon-backend/blob/master/blog/posts/s-function.json
  • 30. 5. IMPLEMENT THE LOGIC § Implement the logic for the function into blog/posts. The entry point for the Lambda function is handler.js in that folder. § Copy the files handler.js and blog_storage.js from github (unless you want to code them yourself) § Use e.g. AWS.DynamoDB.DocumentClient to access the database table. The table name is ${process.env.SERVERLESS_STAGE}- ${process.env.SERVERLESS_PROJECT}-blog Samples: https://github.com/SC5/aws-serverless-hackathon-backend/blob/master/blog/posts/handler.js https://github.com/SC5/aws-serverless-hackathon-backend/blob/master/blog/posts/blog_storage.js
  • 31. 6. TEST THE FUNCTION q sls function run can be used to run the function with the input defined in event.json q Copy the snippet on the right to blog/posts/event.json and run > sls function run q NOTE: sls-mocha-plugin is included in the boilerplate to support more advanced TDD { "method": "POST", "body": { "title": "Test post", "content" : "Test content" } } Sample: https://github.com/SC5/aws-serverless-hackathon-backend/blob/master/blog/posts/event.json
  • 32. 7. DEPLOY FUNCTIONS & ENDPOINTS > sls function deploy posts > sls endpoint deploy --all This deploys the functions and endpoinst (including CORS headers). sls dash deploy does not (currently) deploy the CORS headers. You will get the URLs for the endpoints as response to endpoint deploy
  • 33. 8. SET UP ENDPOINTS IN THE SAMPLE APP q Launch the blog application at http://hackathon-blog.serverless.fi q Enter the endpoint URL (https://…/dev/posts) to the form and save q Try writing, editing, deleting posts
  • 34. 9. YOU DID IT! CONGRATS! Next: 1. If you want to work more on serverless, check opportunities at https://sc5.io/careers 2. If you are in the Helsinki Area and interested in serverless, join the ”Helsinki Serverless” meetup at http://www.meetup.com/Helsinki-Serverless/