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
RAM | 128mb - 10 Gb |
CPU | linked to RAM, 2 vCPU 128 - 6 vCPU 10 Gb |
Timeout | up to 15 minutes |
/temp storage | 10 Gb |
Deployment Package | 50mb 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 |
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
Invocations
- Synchronous - CLI,SDK,API = returns result right away - error on client side
- Asynchronous - SNS/SQS/Event = up to 3 retry (idempotent) - can set dead letter queue
Lambda@Edge / CloudFront Functions
Run Code @edge to minimize latency : filter requests, user authentication
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)