Question
What is the maximum Lambda function timeout?
Click to reveal answer
Answer
15 minutes (900 seconds). For longer tasks, use Step Functions, ECS, or EC2.
Click to flip back
All AWS Lambda Flashcards
Q: What is the maximum Lambda function timeout?
A: 15 minutes (900 seconds). For longer tasks, use Step Functions, ECS, or EC2.
Q: What is the difference between reserved and provisioned concurrency?
A: Reserved concurrency guarantees a pool of concurrent executions (limits and reserves). Provisioned concurrency pre-warms environments to eliminate cold starts.
Q: How does Lambda handle async invocation failures?
A: Lambda retries twice with delays. After retries, sends to a dead-letter queue (SQS/SNS) or an on-failure destination.
Q: What is a Lambda layer?
A: A ZIP archive with libraries, runtimes, or config shared across functions. Max 5 layers per function. Total unzipped size ≤ 250 MB.
Q: What is the difference between a version and an alias?
A: A version is an immutable snapshot of code + config. An alias is a named pointer to a version and supports traffic shifting for deployments.
Q: How does event source mapping work?
A: Lambda polls the source (SQS, Kinesis, DynamoDB Streams), fetches records in batches, and invokes the function synchronously.
Q: What is Lambda's maximum deployment package size?
A: 50 MB zipped, 250 MB unzipped (including layers). For larger packages, use container images up to 10 GB.
Q: What causes Lambda cold starts?
A: First invocation or scaling up creates new execution environments. Runtime init, dependency loading, and handler init contribute to latency.
Q: How do you pass secrets to Lambda?
A: Use environment variables encrypted with KMS, or retrieve from Secrets Manager / Parameter Store at runtime. Cache secrets outside the handler.
Q: What is the Lambda execution environment lifecycle?
A: INIT (extensions, runtime, handler init) → INVOKE (handler runs) → SHUTDOWN (cleanup). Environments are reused for subsequent invocations.