A company is designing a deployment pipeline for a containerized microservice that will run on Amazon ECS with AWS Fargate behind an Application Load Balancer (ALB). The application requires zero downtime during updates. The deployment strategy must route exactly 10% of the production traffic to the new version of the microservice, maintain this traffic share for a soak period of exactly 10 minutes, and then shift all remaining traffic to the new version. If any Amazon CloudWatch alarms trigger during this 10-minute soak period, the deployment must automatically roll back immediately. Which strategy and configuration will meet these requirements with the least operational overhead?
- AConfigure AWS CodeDeploy with a blue/green deployment. Select the predefined CodeDeployDefault.ECSCanary10Percent10Minutes deployment configuration, and associate the CloudWatch alarms with the deployment group to manage the rollback.
- Configure AWS CodeDeploy with a blue/green deployment. Create a custom CodeDeploy deployment configuration for ECS with a TimeBasedCanary routing type, specifying 10% traffic for a 10-minute interval. Associate the CloudWatch alarms with the deployment group to manage the rollback.Cevap
- CConfigure AWS CodeDeploy with a blue/green deployment. Select the predefined CodeDeployDefault.ECSLinear10PercentEvery1Minutes deployment configuration, and associate the CloudWatch alarms with the deployment group to manage the rollback.
- DConfigure AWS CodeDeploy with an in-place deployment. Select the CodeDeployDefault.ECSAllAtOnce deployment configuration. Use an AWS Lambda function to update the Application Load Balancer target group routing weights to 10% for 10 minutes before shifting to 100%.
Cevap
Configure AWS CodeDeploy with a blue/green deployment. Create a custom CodeDeploy deployment configuration for ECS with a TimeBasedCanary routing type, specifying 10% traffic for a 10-minute interval. Associate the CloudWatch alarms with the deployment group to manage the rollback.
The correct strategy uses a custom AWS CodeDeploy deployment configuration because AWS does not provide a predefined canary configuration for exactly 10 minutes (only 5-minute and 15-minute options are available). By defining a custom TimeBasedCanary routing configuration with a 10% canary percentage and a 10-minute interval, the system keeps traffic at 10% for the required soak duration before shifting the rest. Associating CloudWatch alarms with the CodeDeploy deployment group enables automatic, zero-downtime rollbacks if the alarms trigger.
Adım Adım Çözüm
Anahtar Kavram
Custom ECS deployment configurations and canary routing in AWS CodeDeploy