Friday, June 9, 2017

AWS Lambda

AWS Lambda is one of the most popular serverless computational architecture in use.
It is Event Driven.

It supports the following Function Runtime
  1. Python 2.7
  2. Node.js v0.10.36 v4.3.2
  3. Java 8
  4. C# Runtime.
There are certain addons that you can use for example C++.

 File Size Limitations
  1. Uncompressed code and dependencies must be < 250MB
  2. Compressed function < 50MB
  3. Total File Size in all of the Region < 75GB
How to come around these limitions
  1. Search for smaller 3rd party libraries 
  2. Can consider micro services architecture vs monolith
  3. Other runtime solutions like python vs java vs Javascript
 Resource Limitations
  1. Empheral File Storage < 512MB
  2. Maximum Execution Limitations of 300 seconds ( it includes wait time for DB query or an API return call )
  3. Limit of 100 Concurrent Lambda function
How to overcome these Limitations ?
  1. Suppose you have to write a file processing functionality using Lambda, consider downloading it in S3 (in 500MB chunks) and processing in lambda.
  2. Break as needed and chain lambdas
  3. If you want to call more than 100 Lambdas , try contacting AWS and see if they can increase the limit in your account.
 Others
  1. Memory 128 MB - 1.5 GB
  2. CPU doesn't have a configuration within lambda function , but it should scale proportionately with memory allocation to your function.... so if you double the memory in your function it should double the CPU.
  3.  Can configure function to access resources only within VPC , runs inside a VPC by default it doesn't have access to resources within your private VPC
Miscellaneous
  • They are given certain default configurations , based on role you provide



No comments: