Question

Difficulty: MediumDeployment Strategy Design

A company's production application runs on Amazon EC2 instances managed by an Auto Scaling group behind an Application Load Balancer (ALB). A solutions architect is designing a deployment pipeline using AWS CodeDeploy to update the application with zero downtime.

The deployment strategy must meet the following requirements:
1. The new version must be deployed to a completely separate set of EC2 instances for validation.
2. Production traffic must not be routed to the new instances until the development team manually verifies the deployment.
3. Once verified, production traffic must be switched to the new instances.
4. The original EC2 instances must be kept running for 2 hours after traffic is redirected to allow for a quick manual rollback if issues arise, after which they must be terminated.

Which TWO configurations should the solutions architect specify in the AWS CodeDeploy deployment group to meet these requirements? (Select two.)

  1. Set the deployment type to Blue/Green, and configure the environment settings to copy the existing Auto Scaling group to provision the replacement instances.Answer
  2. Configure the traffic rerouting setting to manually reroute traffic, and set the original revision termination wait time to 2 hours.Answer
  3. C
    Set the deployment type to In-Place with the CodeDeployDefault.OneAtATime configuration, and configure an ALB test listener to route validation traffic to the updated instances.
  4. D
    Set the deployment type to Blue/Green, and select an AWS-managed canary deployment configuration to automatically shift traffic from the original instances to the new instances over 120 minutes.
  5. E
    Set the deployment type to Blue/Green, and configure the deployment group to use the AWS::CodeDeploy::BlueGreen CloudFormation transform to manage the Auto Scaling group lifecycle.

Answer

To meet the requirements, the solutions architect must set the deployment type to Blue/Green, configure the environment settings to copy the existing Auto Scaling group, configure the traffic rerouting setting to manually reroute traffic, and set the original revision termination wait time to 2 hours.
For EC2 Auto Scaling groups, AWS CodeDeploy supports Blue/Green deployments by cloning the original Auto Scaling group to create a replacement environment. By setting the traffic rerouting configuration to manual, CodeDeploy will deploy the application and wait in a 'Ready' state, allowing the team to test the new instances before routing production traffic. The original instances can be kept active for a designated period (such as 2 hours) before termination, which provides a simple rollback mechanism.

Step-by-Step Solution

1
Determine the deployment type and environment settings.
Selected Blue/Green deployment and configured CodeDeploy to copy the existing Auto Scaling group.
This creates a separate cloned Auto Scaling group with the new application version, keeping the existing instances untouched.
2
Configure traffic rerouting for manual verification.
Traffic rerouting is configured to manual.
This prevents CodeDeploy from immediately shifting production traffic to the new instances, allowing the team to manually test the green environment first.
3
Configure original instance lifecycle rules.
The original revision termination wait time is set to 2 hours.
This ensures the original instances remain active for 2 hours post-traffic swap for quick rollback capability, and are terminated automatically thereafter.

Key Concept

AWS CodeDeploy Blue/Green deployments for EC2 Auto Scaling groups
Rate this question