πŸ¦™

Lambda

Owner
Verification
Tags
Last edited time

Supported Languages (runtimes)

Node.js, Python, Java, C# (.Net/Power shell), Ruby, Lambda Container Image, Rust API.

Integration with:

API gateway, Kinesis, Dynamo, S3, Event Bridge, Cognito, SNS/SQS, Code Deploy (versioning)

Limits

RAM128mb - 10 Gb
CPUlinked to RAM, 2 vCPU 128 - 6 vCPU 10 Gb
Timeoutup to 15 minutes
/temp storage10 Gb
Deployment Package50mb zipped , 250 mb unzipped , 10 GB container Image - can use CodeDeploy within the SAM framework , support canary deployment
concurrent executions 1000 - can set reserved concurrent. retry configuration - on client side. can request quota increase
πŸ™ˆ
Canary Deployment: shifts traffic in two increments. Select from predefined options specifying percentage of traffic shifted to updated Lambda version in first increment and interval (in minutes) before remaining traffic is shifted in second increment.

Monitoring

Logs and metrics in CloudWatch - need execution role

X-Ray - for debug - need to enable in lambda and set execution role

Networking

Default is public within the AWS cloud - can deploy within a VPC in a private subnet with security group and a NAT gateway

β›”
don’t deploy Lambda in a Public subnet it will not get internet access

Invocations

Lambda@Edge / CloudFront Functions

Run Code @edge to minimize latency : filter requests, user authentication

🧚🏻
CloudFront Functions cant change requests - can’t call external services

Lambda Only

Lambda@Edge Lets you run Lambda functions to customize the content that CloudFront delivers, executing the functions in AWS locations closer to the viewer. The functions run in response to CloudFront events, without provisioning or managing servers. You can use Lambda functions to change CloudFront requests and responses at the following points:

– After CloudFront receives a request from a viewer (viewer request)

– Before CloudFront forwards the request to the origin (origin request)

– After CloudFront receives the response from the origin (origin response)

– Before CloudFront forwards the response to the viewer (viewer response)