AWS Lambda little(?) known facts

  1.  Lambda can run on CloudFront edge locations closer to your servers (Lambda@Edge) in response to CloudFront events
  2. You can use a Lambda function to add HTTP security Headers when you cannot modify the application at the origin
  3. Lambda functions scale automatically, without you needed to configure, launch as many copies as needed
  4. To use a new version of specific programming language, you can change the runtime identifier of the Lambda function
  5. The event object passed to the Lambda function as input can be custom, user-defined object
  6. You are charged based on:
    1. number of requests that are served
    2. runtime duration of the function
    3. amount of allocated memory
  7. Maximum timeout is 15 minutes for Lambda. Minimum timeout is 1 second.
  8. You can use memory usage of your Lambda functions in Cloudwatch to ensure you have configured it correctly
  9. Duration of Lambda is calculated from when code begins executing till it ends rounded to nearest 1 ms
  10. You get better performance if you configure Lambda to run on Arm architectures compared to x86
  11. Free tier: 1 million requests and 400,000GB-seconds of compute time, 100 Gib HTTP Responses per month
  12. If you have Compute Savings Plan, Lambda is covered under it
  13. Runtime of Lambda is measured in GB-seconds - the number of seconds your function runs for, multiplied by the amount of RAM memory consumed
  14. With Lambda layers, you can share code between Lambda functions to decrease the size of the functions. A layer does not need to be included in the deployment package.
  15. You can use Lambda to return HTTP response to the user from Cloudfront without going to the origin - for small website, to return 401, to redirect to another page
  16. Built-in logging to CloudWatch is automatically provided, no need to configure
  17. You can orchestrate multiple Lambda functions using Lambda Step functions to define a workflow
  18. Billing is metered in increments of 100 ms
  19. Elastic Load Balancer and API Gateway can invoke your Lambda function directly
  20. Lambda runs driven by
    1. Response to pre-defined event
    2. Direct invocation from code, console, etc 
    3. Pre-defined Schedule
  21. You can use Lambda functions to stop and start EC2 instances on a schedule
  22. Lambda memory can be configured from 128 MB to 20,240MB
  23. Default execution quota is 1000 per region, but can be increased if requested to AWS
  24. Max deployment package size is 250MB


https://aws.amazon.com/lambda/pricing/

https://docs.aws.amazon.com/lambda/latest/dg/welcome.html

Comments

Popular posts from this blog