AWS Lambda
-
Upload
julian-kleinhans -
Category
Services
-
view
142 -
download
0
Transcript of AWS Lambda
102.05.2023
AWS LambdaServerless, event-driven compute service27.03.2017, AOE Developer Weekly, Julian Kleinhans
202.05.2023
Julian KleinhansSoftware Architect @ AOE GmbH
@kj187
302.05.2023
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 2014First major provider
402.05.2023
What means serverless
Serverless• No infrastructure to manage• Upload your code• Lambda handles Capacity, Scaling, Monitoring, Logging, Security patching ...
Focus on business logic
Not infrastructure
502.05.2023
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
602.05.2023
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
702.05.2023
Function
Function handler
NodeJS 4.3 & 6.10Java 8Python 2.7C#
Golang via NodeJS:child_process
ZIP Packagehandler.jsnode_modules/*
802.05.2023
Use Case
1
2
34
Store image in S3
Lambda Event Trigger
Create thumbnail
Store thumbnail in S3
902.05.2023
Use Case
E-Mail DeskPro Middleware TargetProcessAPI Gateway
Create bug ticket
Close ticket
Create ticket Webhook
Event source Lambda
DeskPro -> TargetProcess (fully automated)
1002.05.2023
Limits
Maximum execution duration per request => 300 seconds
Alternative S3 Storage
Lambda function deployment package size (.zip/.jar file) => 50 MB
100 concurrent executions1.000 invokes per second Increases available via AWS customer service
1102.05.2023
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
1202.05.2023
Demo
DEMOhttps://github.com/kj187/aws_terraform_templates
1302.05.2023
Thank youAny Questions ?