Question

Difficulty: MediumDeployment Strategies and Execution

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.)

  1. Specify the CodeDeployDefault.ECSCanary10Percent15Minutes deployment configuration in the CodeDeploy deployment group.Answer
  2. 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
  3. C
    Configure an in-place deployment policy on the Amazon ECS service using a minimum healthy percent of 10% and a maximum percent of 110%.
  4. D
    Select the CodeDeployDefault.ECSAllAtOnce deployment configuration and configure Amazon Route 53 weighted routing to manually split the traffic.
  5. E
    Configure 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

1
Select the appropriate canary deployment configuration in AWS CodeDeploy.
CodeDeployDefault.ECSCanary10Percent15Minutes is selected, which matches the required traffic shifting behavior (10% traffic shifted to the new task set, followed by the remaining 90% after 15 minutes).
This configuration directly automates the 10% canary traffic allocation for the specified 15-minute duration without requiring manual DNS or routing adjustments.
2
Configure a monitoring alarm for rollback triggers.
An Amazon CloudWatch alarm is created to track the HTTP 5XX error rate metric specifically for the green (replacement) target group under the Application Load Balancer.
Monitoring the green target group ensures that issues affecting only the new version of the service are detected.
3
Link the alarm to the CodeDeploy deployment group.
The CloudWatch alarm is designated as a rollback trigger in the CodeDeploy deployment group configuration.
This linkage enables CodeDeploy to automatically abort the deployment and shift 100% of the traffic back to the original (blue) task set if the alarm enters the ALARM state during the deployment process.

Key Concept

AWS CodeDeploy deployment configurations and rollback triggers for Amazon ECS blue/green deployments.
Rate this question