Soru

Zorluk: OrtaDeployment Strategy Design

A company is launching a new version of its monolithic web application. The application is hosted on Amazon EC2 instances inside an Auto Scaling group (ASG) behind an Application Load Balancer (ALB). The update includes minor database schema changes that are backward-compatible.

The deployment process must meet the following criteria:
1. Shift exactly 10% of the user traffic to the new version initially.
2. Monitor the new version for 15 minutes. If the HTTP 5XX error rate or instance CPU utilization exceeds predefined thresholds, the deployment must automatically roll back immediately.
3. If no alarms are triggered during the monitoring period, all traffic must be routed to the new version, and the old instances should be terminated.
4. The deployment and rollback must avoid DNS propagation delays to ensure immediate effect.

Which combination of actions should the solutions architect implement to meet these requirements with the least operational overhead? (Select TWO.)

  1. Create a new target group and a new Auto Scaling group for the new application version. Configure the ALB listener rule with weighted target groups, routing 90% of traffic to the active target group and 10% to the new target group.Cevap
  2. Create a Lambda function triggered by Amazon CloudWatch alarms. Configure the Lambda function to update the ALB listener rule weights to route 100% of traffic back to the original target group if alarms trigger. If no alarms trigger after 15 minutes, update the rule to route 100% of traffic to the new target group and delete the old Auto Scaling group.Cevap
  3. C
    Use AWS CodeDeploy to perform a blue/green deployment. Create a deployment group using the Auto Scaling group and configure the ALB. Choose a deployment configuration of CodeDeployDefault.EC2Linear10PercentEvery1Minute to gradually shift traffic.
  4. D
    Create a second ALB and a new Auto Scaling group for the new version. Configure Amazon Route 53 weighted alias records to route 90% of traffic to the existing ALB and 10% to the new ALB. Use Route 53 active-passive failover to automatically route traffic back if the new version's health checks fail.
  5. E
    Use AWS CodeDeploy to perform an in-place deployment with a deployment configuration of CodeDeployDefault.OneAtATime. Configure the deployment group with a CloudWatch alarm to automatically roll back the deployment if the thresholds are exceeded.

Cevap

The solutions architect should create a new target group and a new Auto Scaling group for the new application version, configure the Application Load Balancer (ALB) listener rule with weighted target groups (90% to the active target group and 10% to the new target group), and use an AWS Lambda function triggered by CloudWatch alarms to automate the rollback (by setting the weight back to 100% on the original target group) or completion of the deployment after 15 minutes.
The correct combination involves creating a new target group and a new Auto Scaling group for the new application version, configuring the ALB listener rule to route 90% of traffic to the active target group and 10% to the new target group, and using an AWS Lambda function triggered by CloudWatch alarms to manage the traffic shifting and rollback. Using ALB weighted target groups allows for instant traffic shifting at the load balancer layer, completely avoiding the DNS propagation delays associated with Route 53. Since CodeDeploy does not support gradual traffic shifting on EC2, a Lambda function is the most operationally efficient way to automate the weight adjustment and cleanup/rollback based on CloudWatch alarms.

Adım Adım Çözüm

1
Provision a new target group and a new Auto Scaling group containing the new version of the application.
This establishes a green environment that runs parallel to the existing blue environment without affecting current production traffic.
Isolation of the new deployment prevents unintended impact on the active environment during initialization.
2
Configure the ALB listener rule to distribute traffic using weights: 90% to the original target group and 10% to the new target group.
Exactly 10% of user traffic is instantly routed to the new version at the load balancer level.
ALB weighted target groups shift traffic immediately without DNS caching or propagation delays, satisfying the zero-downtime and immediate effect criteria.
3
Deploy an AWS Lambda function triggered by CloudWatch alarms for the HTTP 5XX error rate and instance CPU utilization.
If an alarm triggers, Lambda resets the ALB rule weights to 100% blue and 0% green. If 15 minutes pass without alarms, it updates the weights to 100% green and deletes the blue Auto Scaling group.
This automates the monitoring, promotion, and rollback phases with minimal operational overhead, bypassing the limitations of CodeDeploy on EC2.

Anahtar Kavram

Application Load Balancer (ALB) weighted target groups allow for immediate traffic shifting and canary deployments on EC2 instances, bypassing DNS propagation delays and CodeDeploy's EC2 traffic-shifting limitations.
Bu soruyu puanla