AWS Serverless Computing 5 — Questions and Answers
Question 1: A Lambda function processing SQS messages fails on one record in a batch. By default, what happens to the entire batch?
- Only the failed message is retried
- The entire batch is returned to the queue and retried (Correct answer)
- The failed message is sent to a DLQ automatically
- The batch is partially committed up to the failed record
Correct answer: The entire batch is returned to the queue and retried
By default, if a Lambda function throws an error, the entire batch is considered failed and all messages return to the queue for retry.
Question 2: Which AWS Lambda scaling behavior is controlled by Reserved Concurrency?
- It pre-warms execution environments to reduce cold starts
- It sets a hard maximum on the number of concurrent executions for that function (Correct answer)
- It allocates CPU proportional to memory
- It guarantees a minimum number of warm instances at all times
Correct answer: It sets a hard maximum on the number of concurrent executions for that function
Reserved Concurrency caps the maximum concurrent executions for a specific function, preventing it from consuming the account-wide limit.
Question 3: An API Gateway HTTP API needs to authenticate users via JWT tokens issued by Amazon Cognito. What feature should be configured?
- Lambda Authorizer
- IAM authorization
- JWT Authorizer (Correct answer)
- Cognito Authorizer (REST API)
Correct answer: JWT Authorizer
HTTP APIs support JWT Authorizers that validate tokens directly from any OIDC-compliant issuer including Cognito without a Lambda function.
Question 4: What is the purpose of AWS Lambda Power Tuning tool?
- Automatically scales Lambda concurrency based on load
- Finds the optimal memory/CPU configuration balancing cost and performance (Correct answer)
- Monitors Lambda cold start frequency
- Manages Lambda layer versions across regions
Correct answer: Finds the optimal memory/CPU configuration balancing cost and performance
Lambda Power Tuning runs your function at multiple memory settings and visualizes the cost-performance tradeoff to find the optimal configuration.
Question 5: Which Step Functions workflow type supports high-volume event processing at a lower cost but does NOT support activities or some advanced features?
- Standard Workflows
- Express Workflows (Correct answer)
- Parallel Workflows
- Map State Workflows
Correct answer: Express Workflows
Express Workflows are optimized for high-volume, short-duration workloads and are priced per execution duration rather than per state transition.
Question 6: A serverless application uses DynamoDB Streams to trigger Lambda. The stream has 4 shards. What is the maximum number of concurrent Lambda invocations processing the stream simultaneously?
- 1
- 4 (Correct answer)
- 10
- Unlimited
Correct answer: 4
Lambda invokes one concurrent execution per shard, so a 4-shard DynamoDB Stream can have at most 4 concurrent Lambda invocations by default.
Question 7: Which feature of Amazon EventBridge allows you to replay archived events through an event bus to re-process them with updated Lambda consumers?
- Event Replay (Correct answer)
- Event Archives
- Schema Registry rollback
- Dead Letter Queue requeue
Correct answer: Event Replay
EventBridge Event Replay lets you replay archived events from a specific time window through a bus, enabling re-processing without republishing.
A Lambda function processing SQS messages fails on one record in a batch.
By default, what happens to the entire batch?