โ˜๏ธAWSDVA Prep
← All cheat sheets
โšก

AWS Lambda

Development with AWS Services

Event-driven, serverless compute that runs code without provisioning servers.

Core concepts

  • โ–ธMax execution timeout: 15 minutes.
  • โ–ธMemory: 128 MB โ€“ 10,240 MB; CPU scales proportionally with memory.
  • โ–ธ/tmp ephemeral storage: up to 10,240 MB, persists only for the life of the execution environment.
  • โ–ธDeployment package limits: 50 MB zipped (direct upload), 250 MB unzipped, 10 GB for container images.

Concurrency

  • โ–ธReserved concurrency: caps AND guarantees a max number of concurrent executions for a function.
  • โ–ธProvisioned concurrency: pre-initializes environments to eliminate cold starts for predictable load.
  • โ–ธUnreserved account concurrency is shared across all functions without reserved concurrency.

Versions, aliases & deployment

  • โ–ธVersions are immutable snapshots of code + config; $LATEST is always mutable.
  • โ–ธAliases are mutable pointers to a version, and can split traffic by weight between two versions.
  • โ–ธCodeDeploy automates canary/linear traffic shifting between versions via an alias, with alarm-based rollback.

Integration patterns

  • โ–ธSynchronous invocations: API Gateway, ALB, direct SDK calls โ€” caller waits for a response.
  • โ–ธAsynchronous invocations: S3 events, SNS โ€” Lambda retries automatically and can send failures to a DLQ or Lambda Destination.
  • โ–ธPoll-based (event source mapping): SQS, Kinesis, DynamoDB Streams โ€” Lambda service polls on your behalf.
  • โ–ธLambda Destinations route async/stream success or failure results to SQS, SNS, EventBridge, or another Lambda โ€” richer than a DLQ.
Test yourself on this โ†’