AWS Lambda lets you run code without provisioning or managing servers.
You upload your function code, set triggers, and AWS handles execution, scaling, and availability.
EC2 vs Lambda
- EC2: Virtual machines, always running, limited by CPU/RAM, scaling often manual or via ASG.
- Lambda: Event-driven, no server management, short-lived executions, scales automatically to match demand.
Key Benefits
- Pricing: Pay only for the number of requests and execution time.
- Free tier: 1M requests + 400K GB-seconds per month.
- Fully integrated with AWS services (S3, API Gateway, DynamoDB, EventBridgeβ¦).
- Multiple runtimes: Node.js, Python, Java, C#, Ruby, plus custom runtimes (e.g., Go, Rust).
- CloudWatch integration for logs and metrics.
- Configurable memory allocation (128 MB β 10 GB).
- Increasing memory also boosts CPU and network throughput.
Lambda Container Images
- Supports container-based deployment if the image implements the Lambda Runtime API.
- For generic Docker workloads, use ECS or Fargate instead.
Β
AWS Lambda β IntegrationsAWS Lambda β PricingAWS Lambda β Key Limits (Per Region)AWS Lambda β Concurrency & ThrottlingAWS Lambda β Cold Starts & Provisioned ConcurrencyAWS Lambda β Reserved vs. Provisioned ConcurrencyAWS Lambda β SnapStartLambda Networking β Default vs. VPCLambda with RDSAWS Lambda Layers