An enterprise is designing a deployment pipeline for a legacy Java application hosted on Amazon EC2 instances within an Auto Scaling group behind an Application Load Balancer. The deployment must achieve zero downtime and allow for a 1-hour verification window where the old version remains active but receives no traffic, enabling rapid rollback if issues are detected. If the validation succeeds, the old instances must be automatically terminated. The deployment process must be fully managed with minimal custom configuration. Which two configurations should the Solutions Architect include in the AWS CodeDeploy deployment group to meet these requirements? (Select two.)
- Configure the deployment group to copy the Auto Scaling group and use the Application Load Balancer target group to route traffic.Answer
- Configure the deployment group settings to reroute traffic immediately, and set the original Auto Scaling group instances to terminate after a waiting period of 60 minutes.Answer
- CSet the deployment configuration to CodeDeployDefault.EC2Linear10PercentEvery10Minutes to shift traffic between the blue and green environments.
- DConfigure an Auto Scaling lifecycle hook on the original Auto Scaling group for the EC2_INSTANCE_TERMINATING transition with a heartbeat timeout of 3600 seconds.
- ECreate a second Auto Scaling group for the new version and configure an Amazon Route 53 weighted routing policy to shift traffic between the two Auto Scaling groups over 60 minutes.
Answer
Configure the deployment group to copy the Auto Scaling group and use the Application Load Balancer target group to route traffic, and configure the deployment group settings to reroute traffic immediately while setting the original Auto Scaling group instances to terminate after a waiting period of 60 minutes.
For an EC2 Auto Scaling deployment using CodeDeploy, a blue/green deployment requires copying the Auto Scaling group and using an Application Load Balancer target group to route traffic. Setting the deployment group to reroute traffic immediately and setting the original instances to terminate after a 60-minute wait time ensures that traffic shifts to the new version immediately while keeping the old instances running and deregistered from the load balancer. This provides a 1-hour window for verification and rapid rollback without downtime, followed by automated termination.
Step-by-Step Solution
Key Concept
AWS CodeDeploy Blue/Green deployment configurations for EC2 Auto Scaling Groups