AWS DevOps Serverless Deployment 3 — Questions and Answers
Question 1: Which AWS service allows you to define serverless workflows that orchestrate multiple Lambda functions with built-in error handling and retries?
- Amazon SQS
- AWS Step Functions (Correct answer)
- Amazon EventBridge
- AWS Batch
Correct answer: AWS Step Functions
AWS Step Functions lets you coordinate Lambda functions and other services using state machines with configurable retry, catch, and parallel execution.
Question 2: What is the maximum deployment package size (unzipped) for a Lambda function deployed via the console or CLI?
- 50 MB
- 250 MB (Correct answer)
- 512 MB
- 1 GB
Correct answer: 250 MB
The maximum unzipped deployment package size for Lambda is 250 MB; the zipped package limit is 50 MB when uploading directly.
Question 3: A team wants to share common libraries across multiple Lambda functions without duplicating code in each package. What is the recommended approach?
- S3 shared bucket
- Lambda layers (Correct answer)
- Lambda environment variables
- Elastic File System
Correct answer: Lambda layers
Lambda layers allow you to package shared libraries or runtimes and attach them to multiple functions, reducing deployment package size and duplication.
Question 4: In AWS CDK, which construct level is best suited for deploying a pre-built Lambda function with sensible defaults for a DevOps pipeline?
- L1 (CfnFunction)
- L2 (Function) (Correct answer)
- L3 (ApplicationLoadBalancedFargateService)
- Custom construct
Correct answer: L2 (Function)
L2 constructs like aws_lambda.Function provide high-level abstractions with secure defaults, making them ideal for standard Lambda deployments in a pipeline.
Question 5: A Lambda function behind an API Gateway endpoint is experiencing throttling. Which metric in CloudWatch indicates requests are being rejected due to concurrency limits?
- Errors
- Duration
- Throttles (Correct answer)
- ConcurrentExecutions
Correct answer: Throttles
The Throttles metric counts the number of invocation requests that Lambda rejected because the function reached its concurrency limit.
Question 6: When using AWS SAM with the --capabilities CAPABILITY_IAM flag during deployment, what does this flag authorize?
- Creation of S3 buckets
- Creation of IAM roles and policies by CloudFormation (Correct answer)
- Cross-account deployments
- Use of nested stacks
Correct answer: Creation of IAM roles and policies by CloudFormation
CAPABILITY_IAM explicitly acknowledges that CloudFormation may create or modify IAM resources as part of the stack deployment.
Question 7: Which Lambda invocation model should a DevOps engineer use to ensure a message is processed exactly once even if Lambda is retried?
- Synchronous with retry logic in the caller
- Asynchronous invocation with idempotency key in the function
- Event source mapping from SQS FIFO queue with message deduplication ID (Correct answer)
- Scheduled EventBridge rule
Correct answer: Event source mapping from SQS FIFO queue with message deduplication ID
SQS FIFO queues with message deduplication IDs combined with Lambda's event source mapping provide exactly-once processing guarantees.
Which AWS service allows you to define serverless workflows that orchestrate multiple Lambda functions with built-in error handling and retries?