An enterprise runs a critical application on Amazon EC2 instances managed by an Auto Scaling group (ASG) behind an Application Load Balancer (ALB). The application must maintain at least 90% of its normal capacity (10 instances) at all times during updates. The solutions architect must design a deployment strategy that routes 10% of incoming traffic to a new version of the application for a 20-minute evaluation period, with the remaining 90% routed to the current version. If HTTP 5xx errors exceed a specified threshold during this period, the deployment must automatically roll back. Due to strict vCPU service quotas in the AWS Region, the organization cannot provision a duplicate ASG of the same size to perform a standard CodeDeploy blue/green deployment. Which two actions should the solutions architect recommend to meet these requirements?
- Configure the Application Load Balancer with two target groups: a primary target group pointing to the existing production Auto Scaling group, and a canary target group pointing to a new, separate Auto Scaling group provisioned with 10% of the production group's capacity.Answer
- Configure the Application Load Balancer listener rule to use weighted target group routing, directing 90% of traffic to the primary target group and 10% to the canary target group, and use an AWS Lambda function triggered by CloudWatch alarms to reset the canary target group weight to 0% upon failure.Answer
- CConfigure AWS CodeDeploy with a Blue/Green deployment type, selecting the existing Auto Scaling group and using the CodeDeployDefault.EC2Canary10Percent20Minutes deployment configuration to manage the traffic shifting.
- DApply a CloudFormation UpdatePolicy with an AutoScalingRollingUpdate to the Auto Scaling group, setting MaxBatchSize to 10% and MinInstancesInService to 90%, and configure the ALB to route 10% of traffic to the updating instances.
- EConfigure AWS CodeDeploy with an In-Place deployment type using the CodeDeployDefault.OneAtATime configuration, and enable ALB traffic shifting in the deployment group to isolate 10% of traffic to the newly deployed instances.