A company is preparing to deploy a new version of a microservice that runs on Amazon ECS using the AWS Fargate launch type. The microservice is behind an Application Load Balancer (ALB). The solutions architect must design a deployment strategy that routes 10% of production traffic to the new version initially, pauses for 15 minutes to monitor for errors, and then shifts the remaining 90% of the traffic to the new version. If any application errors or elevated response times are observed during the deployment, the traffic must be immediately redirected back to the old version. Which two options should the solutions architect select to implement this deployment strategy? (Select two.)
- Configure the AWS CodeDeploy deployment group to use the CodeDeployDefault.ECSCanary10Percent15Minutes deployment configuration.Cevap
- Create Amazon CloudWatch alarms for the Application Load Balancer target group metrics, and add these alarms to the rollback configuration of the CodeDeploy deployment group.Cevap
- CConfigure the ECS service deployment controller to use the ECS rolling update type, and specify a minimum healthy percent of 90%.
- DConfigure the AWS CodeDeploy deployment group to use the CodeDeployDefault.ECSLinear10PercentEvery1Minutes deployment configuration.
- EConfigure the Application Load Balancer listener rules with weighted target groups to route 10% of traffic to the new ECS service, and use an AWS Lambda function to increment the weight to 100% after 15 minutes.
Cevap
Configure the AWS CodeDeploy deployment group to use the CodeDeployDefault.ECSCanary10Percent15Minutes deployment configuration, and create Amazon CloudWatch alarms for the Application Load Balancer target group metrics to add to the rollback configuration of the CodeDeploy deployment group.
The correct strategy uses AWS CodeDeploy to orchestrate an ECS blue/green deployment. The predefined configuration stating CodeDeployDefault.ECSCanary10Percent15Minutes routes 10% of traffic to the green target group for 15 minutes before routing 100%. Associating CloudWatch alarms for ALB target group metrics with the deployment group ensures that CodeDeploy automatically rolls back the deployment to the original task set if errors or latency spikes occur.
Adım Adım Çözüm
Anahtar Kavram
AWS CodeDeploy handles blue/green deployments for Amazon ECS by using Application Load Balancer target groups to shift traffic. Predefined deployment configurations, such as Canary, allow a solutions architect to shift a specific percentage of traffic for a set period before shifting the rest. Automated rollbacks are configured by associating CloudWatch alarms directly with the CodeDeploy deployment group.