Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AWS Lambda

AWS Lambda

Serverless, event-driven compute service

Julian Kleinhans

June 09, 2017
Tweet

More Decks by Julian Kleinhans

Other Decks in Technology

Transcript

  1. 5 09.06.17 What means serverless NO, there are servers But

    someone else is responsible Cloud Provider
  2. 6 09.06.17 Goal behind serverless Primarily focus on code Not

    infrastructure Capacity, Scaling, Monitoring, Logging, Security Patching ...
  3. 8 09.06.17 Flow 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 Your Code
  4. 9 09.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
  5. 12 09.06.17 Function ZIP Package handler-xyz.js node_modules/* Terraform example resource

    "aws_lambda_function" "lambda_nodejs_example" { filename = “directory/example-nodejs-lambda.zip" function_name = "example_nodejs_lambda" handler = ”handler-xyz.handler" runtime = "nodejs6.10" }
  6. 13 09.06.17 Use Case 1 2 3 4 Store image

    in S3 Lambda Event Trigger Create thumbnail Store thumbnail in S3
  7. 14 09.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)
  8. 15 09.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
  9. 16 09.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