SAA-C03 ยท Decoupling and serverless patterns
AWS Lambda for event-driven workloads
Lambda triggers (S3, SQS, API Gateway, EventBridge), the 15-minute timeout, stateless execution and when a workload does not fit Lambda.
Key points
- Lambda runs your function on events: S3 object, SQS messages (Lambda polls), API Gateway request, EventBridge rule.
- Limit: 900 seconds (15 minutes) per invocation.
- Memory: 128 to 10,240 MB; CPU scales in proportion.
- Stateless: durable state goes to S3, DynamoDB or a cache.
- Multi-hour jobs, always-on servers, apps needing local state between requests fit containers or EC2 better.
Source: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html
Practice questions
What is the maximum timeout you can set for a single invocation of a standard Lambda function?
- 60 seconds
- 5 minutes
- 15 minutes
- 24 hours
Show answer
Answer: C. 15 minutes
The function timeout tops out at 900 seconds, which is 15 minutes. Five minutes is the Express workflow limit in Step Functions, not a Lambda limit.
Which statements about designing Lambda functions are correct?
- Code should not depend on data left by a previous invocation
- Session or order state should be kept in a store such as DynamoDB
- Lambda routes all requests of one user to the same environment
- Memory is configurable up to 10,240 MB, with CPU in proportion
- The /tmp directory is fixed at 512 MB and cannot be enlarged
Show answer
Answer: A. Code should not depend on data left by a previous invocation, B. Session or order state should be kept in a store such as DynamoDB, D. Memory is configurable up to 10,240 MB, with CPU in proportion
Function code must not rely on state from an earlier invocation, so durable data belongs in an external store; memory can go up to 10,240 MB and CPU grows with it. Lambda does not pin a user's session to one execution environment, and /tmp is configurable from 512 MB up to 10,240 MB rather than fixed.
Raising a Lambda function's memory setting only adds RAM; the CPU power available to the function stays the same.
Show answer
Answer: False
False. Lambda allocates CPU in proportion to the configured memory (about one vCPU at 1,769 MB), so a CPU-bound function often runs faster, and sometimes cheaper, with more memory.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
