AWS DevOps Release Strategies 2 — Questions and Answers
Question 1: During a canary deployment on AWS, what is the primary purpose of keeping the canary group small (e.g., 5–10% of traffic)?
- To reduce infrastructure costs during deployment
- To limit blast radius if the new version has defects (Correct answer)
- To comply with AWS CodeDeploy's minimum instance requirement
- To ensure the load balancer can handle the traffic split
Correct answer: To limit blast radius if the new version has defects
A small canary group limits the number of users affected if the new version contains bugs, reducing the blast radius before a full rollout.
Question 2: An AWS CodePipeline stage has an action with a manual approval gate. What happens to the pipeline if the approval is rejected?
- The pipeline retries the previous stage automatically
- The pipeline execution stops and the stage is marked as failed (Correct answer)
- AWS SNS sends an alert and the pipeline continues
- The pipeline rolls back all previous stages automatically
Correct answer: The pipeline execution stops and the stage is marked as failed
Rejecting a manual approval action stops the pipeline execution and marks that stage as failed, preventing downstream stages from running.
Question 3: Which AWS service allows you to gradually shift Lambda function traffic between two versions using weighted aliases?
- AWS CodeDeploy with Lambda deployment configuration (Correct answer)
- Amazon API Gateway with stage variables
- AWS Step Functions with choice states
- AWS CloudFormation with Lambda version resources
Correct answer: AWS CodeDeploy with Lambda deployment configuration
AWS CodeDeploy supports Lambda traffic shifting by routing a configurable percentage of invocations to the new version via weighted Lambda aliases.
Question 4: In a blue/green deployment, what does 'cutover' refer to?
- Terminating the blue environment after testing
- Shifting all production traffic from the blue environment to the green environment (Correct answer)
- Deploying the new application version to the blue environment
- Rolling back from green to blue after a failed deployment
Correct answer: Shifting all production traffic from the blue environment to the green environment
Cutover is the moment when 100% of production traffic is redirected from the old (blue) environment to the new (green) environment.
Question 5: A team uses AWS Elastic Beanstalk and wants zero downtime with the ability to roll back instantly. Which deployment policy should they choose?
- Rolling
- All at once
- Immutable (Correct answer)
- Rolling with additional batch
Correct answer: Immutable
Immutable deployments launch a fresh set of instances with the new version; if health checks fail, the new instances are terminated, leaving the original instances untouched.
Question 6: Which feature of AWS CodeDeploy automatically rolls back a deployment when CloudWatch alarms breach defined thresholds?
- Deployment lifecycle hooks
- Automatic rollback with CloudWatch alarm monitoring (Correct answer)
- AWS Config remediation actions
- CodeDeploy deployment groups with SNS triggers
Correct answer: Automatic rollback with CloudWatch alarm monitoring
CodeDeploy's automatic rollback can be configured to revert a deployment when specified CloudWatch alarms enter the ALARM state.
Question 7: What is the key difference between a 'linear' and a 'canary' traffic-shifting configuration in AWS CodeDeploy?
- Linear shifts traffic in equal increments over time; canary shifts a small percentage first, then all at once (Correct answer)
- Canary uses weighted routing; linear uses round-robin routing
- Linear requires manual approval between shifts; canary is fully automated
- Canary is only available for EC2; linear is only available for Lambda
Correct answer: Linear shifts traffic in equal increments over time; canary shifts a small percentage first, then all at once
Linear configurations shift traffic in equal increments at set intervals, while canary shifts a small initial percentage and then moves the remainder all at once after a bake period.
During a canary deployment on AWS, what is the primary purpose of keeping the canary group small (e.g., 5–10% of traffic)?