A SysOps Administrator is setting up a blue/green deployment for an Amazon ECS service using AWS CodeDeploy. The deployment must shift 10% of the traffic to the new version initially, wait 10 minutes, and then route the remaining 90% of the traffic to the new version. If the new version fails any health checks or triggers standard error rate alarms during the test period, the deployment must automatically roll back. Which TWO configuration steps should the administrator take to meet these requirements?
- Select the CodeDeployDefault.ECSCanary10Percent10Minutes deployment configuration in the deployment group settings.Answer
- Add CloudWatch alarms to the deployment group's rollback configuration to monitor for errors during the deployment.Answer
- CUse an Application Load Balancer with dynamic listener rules to swap the target groups manually after 10 minutes.
- DCreate a Route 53 weighted record set pointing to two different load balancers and configure Route 53 health checks to trigger rollbacks.
- EGrant the CodeDeploy deployment group the iam:AssumeRole permission for the ECS task execution role to pass the role to ECS.
Answer
The SysOps Administrator should select the CodeDeployDefault.ECSCanary10Percent10Minutes deployment configuration in the deployment group settings, and add CloudWatch alarms to the deployment group's rollback configuration to monitor for errors during the deployment.
The correct strategy uses AWS CodeDeploy's native ECS integration. The preconfigured setting shifts a small portion of traffic (10%) to the replacement task set for a brief trial period (10 minutes) before completing the shift to 100%. To implement automatic rollback, CloudWatch alarms must be attached to the deployment group. If the alarms trigger during the deployment, CodeDeploy will roll back to the original task set.
Step-by-Step Solution
Key Concept
AWS CodeDeploy integration with Amazon ECS for automated canary deployments and rollbacks.