aws lambda and the serverless cloud -pop-up loft
TRANSCRIPT
![Page 1: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/1.jpg)
AWSLambdaandtheServerlessCloudRan Tessler, AWS Solu0ons Architecture Manager
![Page 2: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/2.jpg)
AWS Lambda – No Infrastructure to Manage
A compute service where you don’t have to think about: • Servers • Being over/under capacity • Deployments • Scaling and fault tolerance • OS or language updates • Metrics and logging
…but where you can easily • Bring your own code… even
native libraries • Run code in parallel • Create backends, event
handlers, and data processing systems
• Never pay for idle!
![Page 3: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/3.jpg)
AWS Lambda – Benefits
EVENT-DRIVEN SCALE SERVERLESS SUBSECOND BILLING
![Page 4: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/4.jpg)
AWS Lambda – Pricing
• Requests • $0.20 per 1 million requests • First 1 million requests per month are FREE
• Duration • $0.00001667 for every GB-second used. • Rounded up to the nearest 100ms • 400,000 GB-seconds of compute time per month are FREE
![Page 5: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/5.jpg)
AWS Lambda – How It Works
DEPLOYMENT
AUTHORING
MONITORING & LOGGING
STATELESS
![Page 6: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/6.jpg)
AWS Lambda Function
• Author your code • Node.js, Java 8, Python 2.7, native libraries
• Configure your runtime • Handler • Execution Role • Resource Sizing – 128MB up to 1.5GB • Timeout – 100ms up to 5min • Networking – VPC / Public
• Add event sources • Configure API endpoint
![Page 7: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/7.jpg)
AWS Lambda - Resource Sizing
• AWS Lambda offers 23 “power levels” • Higher levels offer more memory and more CPU power
• 128 MB, lowest CPU power • 1.5 GB, highest CPU power
• Higher power levels == lower latency for CPU-bound and bursty tasks
• Compute price scales with the power level • Duration ranging from 100ms to 5 minutes
![Page 8: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/8.jpg)
AWS Lambda – Event Sources
Amazon S3 Amazon DynamoDB
Amazon Kinesis
AWS CloudTrail Amazon CloudWatch
Logs
AWS CloudFormation
Amazon SNS
AmazonSWF
AmazonSES
AmazonAPI Gateway
Amazon Cognito
November 13, 2014 Event Sources:
Integration with AWS Services:
AWS IoT
![Page 9: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/9.jpg)
AWS Lambda – Partner Blueprints
![Page 10: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/10.jpg)
In case you missed it…
![Page 11: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/11.jpg)
New Feature: Scheduled Functions
![Page 12: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/12.jpg)
Scheduled AWS Lambda Functions
• Available today in the Lambda console • Schedule functions at a specific time or recurring • Accepts standard cron syntax • 5 minute granularity
• You can get sub-second granularity using a Lambda function
• Easily poll Amazon SQS or other data sources!
![Page 13: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/13.jpg)
New Feature: Versioning
![Page 14: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/14.jpg)
Versioning: Development
Developing in AWS Lambda stays simple: • Upload code • Make changes any time • Last update wins
exports.handler = function(event,context) {context.succeed(“bye”);}
exports.handler = function(event,context) {context.succeed(“hi”);}
![Page 15: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/15.jpg)
Versioning: Publishing
Publish new versions from development at any time: • “Copies” dev version to a numbered version • Published versions are read-only (including configuration) • Simple, integer counter per function
exports.handler = function(event,context) {context.succeed(“bye”);}
exports.handler = function(event,context) {context.succeed(“hi”);} 1
2Versions
![Page 16: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/16.jpg)
Versioning: Aliases
Create named aliases to any version: • Allows function owner to map ARNs to code • Can be updated without changing clients
exports.handler = function(event,context) {context.succeed(“bye”);}
exports.handler = function(event,context) {context.succeed(“hi”);} prod
dev Aliases
![Page 17: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/17.jpg)
Versioning: Calling Lambda Functions
Development version: FunctionName (or) FunctionName:$LATEST
Specific version: FunctionName:1 FunctionName:2
Named version: FunctionName:production FunctionName:v1_2_3_4
![Page 18: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/18.jpg)
Amazon API Gateway: Version your APIs
/prod/my_url_endpoint à
MyFunction:prod_rel
Versioning APIs and Code
MyFunction:prod_rel à
Function:3 à
{your code}
AWS Lambda: Version your code
![Page 19: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/19.jpg)
New Feature: VPC Access
![Page 20: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/20.jpg)
AWS Lambda VPC Access
• Select the functions to run in your VPC • Select subnets and security groups to use • Your Lambda function can access the private resources
you choose: • Amazon Elasticache • Amazon RDS • Private EC2 endpoints • Any other resources in your VPC
![Page 21: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/21.jpg)
Let’s get busy!
![Page 22: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/22.jpg)
So what are we going to build today?
Voting Application
• A voting application • Fully serverless backend
• Votes stored and aggregated on DynamoDB using Lambda
• Static website on Amazon S3 and authentication using Cognito
• Email voting using SES Inbound Rules integration with Lambda
![Page 23: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/23.jpg)
So what are we doing to build today?
![Page 24: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/24.jpg)
So what are we doing to build today?
![Page 25: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/25.jpg)
So what are we doing to build today?
![Page 26: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/26.jpg)
So what are we doing to build today?
![Page 27: AWS Lambda and the Serverless Cloud -Pop-up Loft](https://reader030.vdocument.in/reader030/viewer/2022020411/586fb4861a28abe57d8b7207/html5/thumbnails/27.jpg)
Ran Tessler AWS Solu0ons Architecture Manager [email protected]