Question

Difficulty: Very hardDeployment Strategies and Execution

A SysOps Administrator is designing a deployment process for a stateless web application hosted on Amazon EC2 instances in an Auto Scaling group (ASG) behind an Application Load Balancer (ALB). The update process must meet the following operational requirements:

1. The application's total serving capacity must not decrease during the deployment.
2. A small, controlled percentage (10%10\%) of live production traffic must be routed to the new version to perform canary testing.
3. If target group 5XX5\text{XX} errors or latency metrics exceed predefined Amazon CloudWatch thresholds, the deployment must automatically roll back within minutes.
4. Active user sessions on the stable version must not be disconnected, terminated, or disrupted during the rollback process.

Which two deployment actions or configurations should the SysOps Administrator implement to achieve these requirements? (Select two.)

  1. Deploy the new version of the application to a new, separate Auto Scaling group registered to a new ALB target group, and configure the ALB listener rules to use weighted target groups to route 10%10\% of traffic to the new target group and 90%90\% to the original target group.Answer
  2. Create a CloudWatch alarm for the new target group's HTTP 5XX5\text{XX} metric that triggers an AWS Lambda function to update the ALB listener rule weights, shifting 100%100\% of traffic back to the original target group if thresholds are exceeded.Answer
  3. C
    Use AWS CodeDeploy with a Blue/Green deployment type, and select a canary deployment configuration (such as CodeDeployDefault.EC2.Canary10Percent10Minutes) to gradually shift traffic to the new Auto Scaling group.
  4. D
    Configure an Amazon Route 53 weighted routing policy with a TTL of 00 seconds pointing to two separate ALBs (one for each application version), and configure Route 53 DNS failover to automatically route traffic away from the new version if health checks fail.
  5. E
    Use AWS CloudFormation with a rolling update policy (AutoScalingRollingUpdate) on the existing Auto Scaling group, setting MinInstancesInService to match the desired capacity, and configuring AutoScalingRollbackRecommendation to revert the stack if CloudWatch alarms are triggered.

Answer

Deploy the new version of the application to a new, separate Auto Scaling group registered to a new ALB target group, configure the ALB listener rules to route 10%10\% of traffic to the new target group and 90%90\% to the original target group, and configure a CloudWatch alarm for the new target group's HTTP 5XX5\text{XX} metric to trigger an AWS Lambda function that shifts 100%100\% of traffic back to the original target group if thresholds are exceeded.
The correct approach uses ALB weighted target groups to route 10%10\% of live traffic to a new, separate Auto Scaling group representing the green version, while the remaining 90%90\% continues to flow to the stable blue version. A CloudWatch alarm monitoring HTTP 5XX5\text{XX} errors on the new target group triggers an AWS Lambda function to immediately modify the listener rule weights, restoring 100%100\% of the traffic to the original target group. This ensures rapid rollback within minutes, maintains full capacity, and preserves active sessions on the stable version.

Step-by-Step Solution

1
Isolate the deployment environment by creating a new Auto Scaling group and registering its instances to a separate ALB target group.
The original Auto Scaling group continues running at full capacity, ensuring no performance degradation during the update.
This guarantees that the original stable environment remains fully operational and untouched.
2
Modify the ALB listener rule to distribute traffic using weights, routing 10%10\% to the new target group and 90%90\% to the original target group.
A controlled subset (10%10\%) of live traffic is directed to the new version for canary testing.
ALB weighted target groups allow precise, instantaneous traffic routing control without relying on DNS-based shifting.
3
Set up an Amazon CloudWatch alarm on the HTTP 5XX5\text{XX} metric for the new target group with a short evaluation period (e.g., 11 minute).
The system monitors the health of the canary version in real-time.
Immediate detection of application errors is required to satisfy the rapid rollback timeline.
4
Configure the CloudWatch alarm to trigger an AWS Lambda function that updates the ALB listener rule to set the weight of the new target group to 0%0\% and the original target group to 100%100\%.
If errors spike, all traffic is redirected back to the stable version immediately, and active sessions on the stable version remain undisturbed.
This automates the rollback and completes the operation within minutes of the alarm triggering.

Key Concept

Application Load Balancer (ALB) Weighted Target Groups and CodeDeploy EC2 Limitations
Rate this question