aws lambda and the serverless cloud -pop-up loft

Download AWS Lambda and the Serverless Cloud -Pop-up Loft

Post on 24-Jan-2018




1 download

Embed Size (px)


  1. 1. AWSLambdaandtheServerlessCloud Ran Tessler, AWS Solu0ons Architecture Manager
  2. 2. AWS Lambda No Infrastructure to Manage A compute service where you dont 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!
  4. 4. 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
  6. 6. 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
  7. 7. 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
  8. 8. AWS Lambda Event Sources Amazon S3Amazon DynamoDB Amazon Kinesis AWS CloudTrailAmazon CloudWatch Logs AWS CloudFormation Amazon SNS Amazon SWF Amazon SES Amazon API Gateway Amazon Cognito November 13, 2014 Event Sources: Integration with AWS Services: AWS IoT
  9. 9. AWS Lambda Partner Blueprints
  10. 10. In case you missed it
  11. 11. New Feature: Scheduled Functions
  12. 12. 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!
  13. 13. New Feature: Versioning
  14. 14. 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);}
  15. 15. 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 2 Versions
  16. 16. 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
  17. 17. 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
  18. 18. 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
  19. 19. New Feature: VPC Access
  20. 20. 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
  21. 21. Lets get busy!
  22. 22. 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
  23. 23. So what are we doing to build today?
  24. 24. So what are we doing to build today?
  25. 25. So what are we doing to build today?
  26. 26. So what are we doing to build today?
  27. 27. Ran Tessler AWS Solu0ons Architecture Manager


View more >