AWS Lambda Cheatsheet
Top commands.
Overview
The Lambda CLI cheatsheet captures the patterns operators actually use during Lambda investigation. Function code is the easy part; aliases, concurrency, and layers are what make Lambda operate at production scale.
- Top commands.
invoke,list-functions,get-function,update-function-code; the four that cover most paths. - Aliases and versions. Per-environment routing; supports progressive deploy via traffic-shifting on the alias.
- Layers. Shared dependencies across functions; reduces deployment package size; faster cold starts.
- Environment variables plus concurrency. Per-function configuration; reserved and provisioned concurrency match throughput.
The approach
The practical approach: alias-driven deploys, environment variables for config, reserved concurrency for predictability. The team’s discipline produces predictable Lambda, not just running Lambda.
- aws lambda invoke --function-name fn --payload file://payload.json out.json. Synchronous invoke; the canonical test path during development.
- aws lambda update-function-code --zip-file fileb://fn.zip. Deploy code; the build-and-ship step CI runs.
- aws lambda put-function-concurrency --reserved-concurrent-executions 100. Reserved capacity; protects downstream from runaway scale.
- aws lambda update-alias. Route alias to a new version, optionally with weighted shift; the canary primitive.
- Document the function. Per-function configuration committed to the repo; supports operational reviews and investigation.
Why this compounds
Lambda fluency compounds across functions. Each function operated grows the team’s serverless expertise; cost-per-question falls as the operational playbook matures.
- Faster deploys. Aliases support progressive rollout; canary 5%, observe, ramp; the safe deploy primitive.
- Better resource awareness. Concurrency settings match throughput; downstream services do not get hammered by uncontrolled scale.
- Reusable patterns. Standard Lambda patterns capture conventions; new functions inherit the team’s muscle memory.
- Institutional knowledge. Each command teaches Lambda patterns; the team’s serverless engineering muscle grows.
Lambda fluency is an operational discipline that pays off across years. Nova AI Ops integrates with Lambda telemetry, surfaces patterns, and supports the team’s serverless discipline.