Skip to content

Instantly share code, notes, and snippets.

@abantej
Last active April 29, 2018 14:37
Show Gist options
  • Save abantej/a77707b3ad985ead14bdc8716b09062a to your computer and use it in GitHub Desktop.
Save abantej/a77707b3ad985ead14bdc8716b09062a to your computer and use it in GitHub Desktop.

AWS Lambda

  • a compute service where you can upload your code and create a Lambda function
  • it take cares of provisioning and managing the servers that you use to run your code
  • you don't have to worry about your operating systems, patching, scaling, etc.

AWS Lambda Usage

  1. as an even-drivent compute service where AWS Lambda runs your code in response to events. these events could be changes to data in an Amazon S3 bucket or an Amazon DynamoDB table.
  2. as a compute service to run your code in response to HTTP requests using Amazon API Gateway or API calls made using AWS SDKs

Currently available Lambda triggers

  1. API Gateway
  2. AWS IoT
  3. Alexa Skills Kit
  4. Alexa Smart Home
  5. CloudFront
  6. CloudWatch Events
  7. CloudWatch Logs
  8. Code Commit
  9. Cognito Sync Trigger
  10. DynamoDB
  11. Kinesis
  12. S3
  13. SNS

AWS Lambda Behavior

  • 1 lambda per HTTP request

AWS Lambda Supported Languages

  1. Node.js
  2. Java
  3. Python
  4. C#

AWS Lambda Pricing

  1. Number of requests
  • first 1 million requests are free. $0.20 per 1 million requests thereafter
  1. Duration
  • Duration is calculated from the time your code begins executing until it returns or otherwise terminates, rounded up to the nearest 100ms.
  • The price depends on the amount of memory you allocate to your function.
  • You are charged $0.00001667 for every GB-second used

Why is Lambda cool?

  1. No servers
  2. Continous Scaling
  3. super super super cheap!

Lambda Exam Tips

  • Lambda scales out (not up) automatically
  • Lambda functions are independent, 1 event = 1 function
  • Lambda is serverless
  • Know what services are serverless
  • Lambda functions can trigger other lambda functions, 1 event can = x functions if functions trigger other functions
  • Architectures can get extremely complicated, AWS X-ray allows you to debug what is happening
  • Lambda can do things globally, you can use it to back up S3 buckets to other S3 buckets etc
  • know your triggers
  • Lambda's duration time is maximum 5 minutes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment