An enterprise is designing a deployment pipeline for a high-throughput microservice hosted on Amazon ECS with AWS Fargate, positioned behind an Application Load Balancer (ALB). Due to strict corporate service limits, the AWS account has a highly constrained Fargate vCPU quota that prevents the concurrent execution of two full fleets ( capacity) of the microservice.
The deployment strategy for new versions must satisfy the following criteria:
1. Route exactly of production traffic to the new version for an initial evaluation period.
2. If health metrics remain stable, increase traffic to the new version by every until it reaches .
3. Automatically roll back traffic to on the old version immediately if any Amazon CloudWatch alarms (such as HTTP error rates) are triggered.
4. Keep the total running Fargate task count across both versions aligned with active traffic demands to avoid exceeding the vCPU quota.
Which combination of actions should the solutions architect implement to meet these requirements? (Select TWO.)
- Register the current version and the new version of the microservice as two separate Amazon ECS services, each associated with its own Application Load Balancer (ALB) target group. Use an AWS Step Functions state machine to programmatically update the weights of the target groups in the ALB listener rule according to the deployment schedule, monitor the CloudWatch alarms, and immediately revert the weight of the current version's target group to if an alarm is triggered.Cevap
- Enable Application Auto Scaling for both ECS services using target tracking policies based on the `ALBRequestCountPerTarget` metric. This dynamically adjusts the task count of each service in proportion to the shifting traffic weights, preventing the combined task count from exceeding the Fargate vCPU quota.Cevap
- CConfigure the ECS service to use the AWS CodeDeploy blue/green deployment controller. Create a custom deployment configuration with the Canary type to route of traffic for , followed by a Linear type to route every , and link the CloudWatch alarms to the deployment group for automatic rollback.
- DConfigure the ECS service to use the ECS rolling update (`ECS`) deployment controller. Set the `maximumPercent` to and the `minimumHealthyPercent` to . Configure an AWS Lambda function triggered by ECS deployment events to adjust the ALB listener rule's target group weights during the update.
- ESet up Route 53 weighted routing policies targeting two separate ALBs, with each ALB routing to one of the ECS services. Implement an AWS Lambda function to adjust the Route 53 record weights according to the schedule, and configure CloudWatch alarms to trigger a weight rollback.