A company is designing a deployment pipeline for a production web application hosted on Amazon EC2 instances inside an Auto Scaling group behind an Application Load Balancer (ALB). The application requires zero downtime during deployments, and the operations team must have the ability to automatically roll back the deployment if new errors are detected via CloudWatch alarms. The team has decided to use AWS CodeDeploy to manage the deployments.
Which two configuration steps should the solutions architect include in the deployment strategy to meet these requirements? (Select two.)
- Configure the CodeDeploy deployment group to use a Blue/Green deployment style, and choose the option to copy the existing Auto Scaling group as the replacement environment.Answer
- Configure CloudWatch alarms to monitor key application metrics such as HTTP 5xx error rates, and associate these alarms with the CodeDeploy deployment group to trigger an automatic rollback if they enter the ALARM state during the deployment.Answer
- CConfigure the CodeDeploy deployment group to use an In-place deployment style with the CodeDeployDefault.OneAtATime deployment configuration, and configure Amazon Route 53 weighted routing to split traffic between the old and new instances.
- DConfigure the Auto Scaling group's CloudFormation UpdatePolicy to use AutoScalingRollingUpdate with a MinInstancesInService value of 0.
- EConfigure the CodeDeploy deployment group to use a Blue/Green deployment style, and select the CodeDeployDefault.LambdaLinear10PercentEvery3Minutes routing configuration to control the traffic shift.
Answer
To meet the requirements, the solutions architect should configure the CodeDeploy deployment group to use a Blue/Green deployment style that copies the existing Auto Scaling group, and associate CloudWatch alarms with the deployment group to trigger an automatic rollback if they enter the ALARM state.
The correct options recommend configuring a blue/green deployment style by copying the existing Auto Scaling group, and using CloudWatch alarms associated with the CodeDeploy deployment group for automated rollback. Copying the Auto Scaling group ensures a clean replacement environment is provisioned and verified before traffic is shifted, preserving the original environment in case of failure. Associating CloudWatch alarms with the deployment group allows CodeDeploy to monitor the application during and immediately after deployment, triggering an automatic rollback to the original environment if errors exceed defined thresholds.
Step-by-Step Solution
Key Concept
Designing a reliable blue/green deployment strategy for Amazon EC2 Auto Scaling groups using AWS CodeDeploy, including automated rollbacks via CloudWatch alarms.