Serverless Deployment Flashcards
7 cards from real AWS practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Serverless Deployment flashcards as text
A DevOps engineer wants to automatically roll back a Lambda deployment if CloudWatch alarms trigger. Which CodeDeploy feature enables this?
Answer: Automatic rollback on alarm
CodeDeploy supports automatic rollback configuration that reverts a deployment when specified CloudWatch alarms enter the ALARM state.
Which environment variable is automatically set by Lambda and provides the name of the current function's CloudWatch log group?
Answer: AWS_LAMBDA_LOG_GROUP_NAME
AWS_LAMBDA_LOG_GROUP_NAME is a reserved environment variable automatically injected by Lambda with the function's log group path.
In a serverless CI/CD pipeline, a Lambda function needs read access to an S3 bucket. What is the most secure way to grant this access?
Answer: Attach an IAM role with least-privilege S3 read policy to the function
Attaching an IAM execution role with a least-privilege policy is the AWS-recommended approach, as Lambda automatically assumes the role without static credentials.
What happens to in-flight Lambda invocations during a CodeDeploy traffic-shifting deployment when automatic rollback is triggered?
Answer: They complete on the version they started on; no new invocations go to the new version
In-flight invocations complete normally on the version they started; CodeDeploy simply stops routing new traffic to the new version and reverts the alias.
A team uses AWS SAM to deploy a Lambda function triggered by EventBridge. Which SAM event source type should they use?
Answer: EventBridgeRule
The EventBridgeRule event type in SAM creates an EventBridge rule that triggers the Lambda function based on the specified event pattern or schedule.
Which Lambda feature allows a DevOps engineer to test a new version of a function with a small percentage of live traffic before full promotion?
Answer: Alias routing configuration (weighted aliases)
Lambda weighted aliases allow traffic to be split between two function versions by assigning routing weights, enabling canary testing in production.
When deploying a containerized Lambda function, which base image registry does AWS recommend using to ensure compatibility?
Answer: AWS-provided base images from Amazon ECR Public Gallery
AWS provides official Lambda base images in Amazon ECR Public Gallery that include the Lambda runtime interface client, ensuring full compatibility.