CloudGuild · Blog · Cheat sheets · Lessons · Certifications
AWS Lambda — Serverless Functions
Run code without managing servers. Pay per invocation and duration. Scales to zero.
What it is
Event-driven functions that AWS runs and scales for you. No servers to patch, pay only for what runs.
When I reach for it
- Event-driven glue: S3 uploads, DynamoDB streams, API Gateway, EventBridge.
- Spiky or unpredictable load where paying for idle EC2 is wasteful.
- Short tasks (up to 15 min) that fit the execution model.
Key architectural decisions
- Concurrency: understand reserved vs provisioned concurrency for latency-sensitive paths.
- Cold starts: provisioned concurrency or lighter runtimes mitigate them.
- Keep functions single-purpose; orchestrate with Step Functions, not giant handlers.
Gotchas & exam traps
- 15-minute max runtime — long jobs belong on ECS/Fargate/EC2 or Step Functions.
- Package/ephemeral storage and memory limits shape design.
- "No servers to manage + scales automatically + pay per use" is the Lambda tell.
The architect view
Serverless is a cost and operations superpower for the right shape of work. Reach for it first for integration and event processing; fall back to containers when you need long-running or specialized runtimes.