Question

Difficulty: MediumDeployment Strategy Design

An enterprise is designing a deployment pipeline for a web application running on Amazon EC2 instances in an Auto Scaling group behind an Application Load Balancer (ALB). The deployment strategy must meet the following requirements:

* Shift exactly 10%10\% of live traffic to the new version of the application.
* Validate the performance of the new version for 1515 minutes using Amazon CloudWatch alarms.
* Immediately roll back 100%100\% of traffic to the current version if any alarms are triggered.
* Shift the remaining 90%90\% of traffic to the new version if no alarms are triggered.

Which combination of actions should the Solutions Architect recommend to achieve these requirements? (Select TWO.)

  1. Configure the Application Load Balancer (ALB) listener to route traffic to 22 separate target groups (representing the current and new Auto Scaling groups) using weighted routing rules.Answer
  2. Implement a pipeline workflow using an AWS Lambda function to update the ALB listener rule weights from 100:0100:0 to 90:1090:10, monitor the CloudWatch alarms for 1515 minutes, and then shift the weights to 0:1000:100 or revert to 100:0100:0 if an alarm is triggered.Answer
  3. C
    Configure an AWS CodeDeploy deployment group with a Blue/Green deployment type, select the Auto Scaling group, and use the `CodeDeployDefault.EC2Canary10Percent15Minutes` deployment configuration.
  4. D
    Configure the Auto Scaling group with an AWS CloudFormation `UpdatePolicy` using `AutoScalingRollingUpdate` with `MinInstancesInService` set to 90%90\% of the capacity, and configure CloudWatch alarm rollbacks.
  5. E
    Deploy 22 separate Application Load Balancers (one for each Auto Scaling group), and configure an Amazon Route 53 weighted routing policy with a weight split of 9090 and 1010 to route traffic.

Answer

Configure the Application Load Balancer listener to route traffic using weighted routing rules to two separate target groups, and implement a pipeline workflow using an AWS Lambda function to adjust the listener weights, monitor CloudWatch alarms, and execute rollbacks.
To achieve the deployment objectives, you must split traffic at the Application Load Balancer level using weighted target groups and separate Auto Scaling groups. A programmatic orchestrator, such as an AWS Lambda function, must manage the transition of target group weights, monitor CloudWatch alarms during the validation window, and revert the weights to the original configuration if an alarm is triggered. This combination allows for precise traffic management, validation, and instantaneous rollback without relying on DNS changes or facing CodeDeploy limitations on EC2.

Step-by-Step Solution

1
Provision a new Auto Scaling group for the new application version and attach it to a new ALB target group, while the current Auto Scaling group remains attached to the original target group.
Two separate target groups are configured under the same ALB: one containing the current instances and one containing the updated instances.
This isolates the two environments so they can receive independent traffic weights.
2
Modify the ALB listener rule to use weighted target group routing, initially directing 10%10\% of traffic to the new target group and 90%90\% to the current target group.
Exactly 10%10\% of live application traffic is routed to the new version, while the remaining 90%90\% remains on the old version.
This initiates the canary release phase to evaluate the new version under real production load.
3
Monitor metrics using Amazon CloudWatch alarms for 1515 minutes. If alarms trigger, invoke an AWS Lambda function to immediately set the old target group weight to 100%100\%. If no alarms trigger, update the weights to route 100%100\% of traffic to the new target group.
The deployment is either rolled back instantly to the old version or fully promoted to the new version.
This validates the deployment before committing all traffic, and ensures a zero-downtime rollback if anomalies are detected.

Key Concept

Orchestrating canary deployments on EC2 using Application Load Balancer weighted target groups when CodeDeploy limitations apply.
Estimated Time:2m 0s
Rate this question