Question

Difficulty: HardDeployment Strategy Design

A company is designing a deployment process for a critical customer-facing web application. The application runs on Amazon EC2 instances within an Auto Scaling group behind an Application Load Balancer (ALB). The infrastructure is managed using AWS CloudFormation templates. The deployment strategy must satisfy the following requirements:

- Perform a blue/green deployment where the new version (green) is fully provisioned alongside the existing version (blue).
- Shift production traffic to the new version, but allow for an immediate rollback (in less than 60 seconds) to the old version if post-deployment smoke tests fail.
- Do not use AWS CodeDeploy or external orchestration tools.
- Keep the deployment process entirely within AWS CloudFormation capabilities.

Which combination of actions should the Solutions Architect include in the design to meet these requirements? (Select two.)

  1. Define a second Auto Scaling group and a new target group in the CloudFormation template to represent the green environment, while keeping the blue Auto Scaling group and target group intact.Answer
  2. Configure the ALB listener rule's action to use a ForwardConfig containing both the blue and green target groups, and update the CloudFormation stack to shift traffic weights between them.Answer
  3. C
    Apply an AutoScalingRollingUpdate policy on the existing Auto Scaling group to perform an in-place rolling update of the EC2 instances using the new AMI.
  4. D
    Create a separate ALB for the green environment, and configure Amazon Route 53 weighted routing records with a 60-second TTL to shift traffic from the blue ALB to the green ALB.
  5. E
    Update the existing launch template with the new AMI, manually terminate the blue EC2 instances using the console to trigger immediate replacement, and run CloudFormation drift detection to synchronize the state.

Answer

Defining a second Auto Scaling group and target group to run the new version alongside the existing one, and using an ALB listener rule with a weighted forward configuration to shift traffic via CloudFormation updates.
Defining a second Auto Scaling group and a new target group allows the new version to run concurrently with the old version. By using the Application Load Balancer listener rule's ForwardConfig, traffic can be shifted between the two target groups by adjusting their weights via CloudFormation updates. Since target group weight adjustments at the ALB level take effect immediately, this approach enables traffic shifting and allows a rollback to complete in less than 60 seconds if tests fail. This meets the requirements without relying on DNS or external orchestration tools.

Step-by-Step Solution

1
Identify the rollback speed and infrastructure control requirements.
The requirements dictate a blue/green deployment under 60 seconds rollback time using only native CloudFormation features.
This eliminates DNS-based routing (due to propagation and cache delays) and in-place rolling updates (due to the time required to re-provision instances).
2
Design the infrastructure separation for blue and green environments.
Specify two separate Auto Scaling groups and target groups within the CloudFormation template.
This maintains separate environments so that both versions are fully provisioned and can run in parallel.
3
Configure the traffic shifting mechanism.
Update the Application Load Balancer listener rule to forward requests using a ForwardConfig containing both target groups with specified weights.
Changing target group weights at the ALB level via a CloudFormation stack update shifts traffic instantly without relying on DNS propagation, enabling immediate rollback.

Key Concept

Implementing blue/green deployments in AWS CloudFormation using weighted ALB target groups for near-instant rollback capability.
Rate this question