A SysOps administrator is configuring a blue/green deployment for a microservice hosted on Amazon ECS with AWS Fargate. The deployment pipeline uses AWS CodeDeploy. The administrator wants to route 10% of the production traffic to the new version of the microservice for a duration of 15 minutes before routing the remaining traffic. Additionally, if the new version displays elevated HTTP 5XX error rates during this test period, the deployment must automatically roll back. Which of the following configuration steps should the administrator perform to achieve this? (Select TWO.)
- Specify the CodeDeployDefault.ECSCanary10Percent15Minutes deployment configuration in the CodeDeploy deployment group.Answer
- Create an Amazon CloudWatch alarm that monitors the HTTP 5XX metric of the replacement (green) target group, and add it as a rollback trigger in the CodeDeploy deployment group.Answer
- CConfigure an in-place deployment policy on the Amazon ECS service using a minimum healthy percent of 10% and a maximum percent of 110%.
- DSelect the CodeDeployDefault.ECSAllAtOnce deployment configuration and configure Amazon Route 53 weighted routing to manually split the traffic.
- EConfigure a trust relationship that allows the ECS task execution role to assume the CodeDeploy service role, but omit the iam:PassRole permission from the CodeDeploy policy.
Answer
Specify the CodeDeployDefault.ECSCanary10Percent15Minutes deployment configuration in the CodeDeploy deployment group, and create an Amazon CloudWatch alarm that monitors the HTTP 5XX metric of the replacement (green) target group and add it as a rollback trigger in the CodeDeploy deployment group.
To implement the required canary traffic shifting, the administrator must choose the predefined CodeDeploy deployment configuration for ECS that corresponds to shifting 10% of traffic for 15 minutes, which is CodeDeployDefault.ECSCanary10Percent15Minutes. To automate the rollback based on application errors, the administrator must configure a CloudWatch alarm targeting the green (replacement) target group's HTTP 5XX metrics and add that alarm as a rollback trigger to the CodeDeploy deployment group.
Step-by-Step Solution
Key Concept
AWS CodeDeploy deployment configurations and rollback triggers for Amazon ECS blue/green deployments.