3 02.06.17
What is AWS Lambda
Alternatives
• Azure Functions (Microsoft)
• OpenWhisk (IBM)
• Google Cloud Functions (beta)
Serverless compute service that runs
your code in response to events Introduced by Amazon in
November 2014
First major provider
Slide 4
Slide 4 text
4 02.06.17
What means serverless
Serverless
• No infrastructure to manage
• Upload your code
• Lambda handles Capacity, Scaling, Monitoring, Logging, Security patching ...
Slide 5
Slide 5 text
5 02.06.17
Events
Event Sources (Event sources that trigger AWS Lambda)
• Amazon S3
• Amazon DynamoDb
• Amazon Kinesis
• Amazon API Gateway (REST API)
• On Demand via SDK
• ...
approx. 16-17 services
Slide 6
Slide 6 text
6 02.06.17
Workflow
Changes in data state
Request to endpoints
Changes in resource state
Event source Function Services (anything)
Change/Add data state
Trigger AWS resource
Call HTTP endpoint
Slide 7
Slide 7 text
7 02.06.17
Function
Function handler
NodeJS 4.3 & 6.10
Java 8
Python 2.7
C#
ZIP Package
handler.js
node_modules/*
Slide 8
Slide 8 text
8 02.06.17
Use Case
1
2
3
4
Store image in S3
Lambda Event Trigger
Create thumbnail
Store thumbnail in S3
Slide 9
Slide 9 text
9 02.06.17
Use Case
E-Mail DeskPro Middleware TargetProcess
API Gateway
Create bug ticket
Close ticket
Create ticket Webhook
Event source Lambda
DeskPro -> TargetProcess (fully automated)
Slide 10
Slide 10 text
10 02.06.17
Limits
Maximum execution duration per request
=> 300 seconds
Alternative S3 Storage
Lambda function deployment package size (.zip/.jar file)
=> 50 MB
100 concurrent executions
1.000 invokes per second
Increases available via AWS customer service
Slide 11
Slide 11 text
11 02.06.17
Costs
1 million requests and
400,000 GB-second of compute time
every month, every customer for free
$0.20 per 1 million requests
($0.0000002 per request)
Never pay for idle