Question

Difficulty: MediumDeployment Strategy Design

A financial services company is launching a new transaction reporting API on Amazon ECS using AWS Fargate. A Solutions Architect must design a deployment strategy that routes exactly 10% of production traffic to the new version of the API, holds it there for a 30-minute validation window, and then shifts the remaining 90% of traffic to the new version. The deployment must automatically roll back within minutes if target response times exceed acceptable thresholds or if HTTP 5XX error rates spike. The solution must minimize costs and avoid DNS caching issues.

Which TWO actions should the Solutions Architect take to meet these requirements? (Select TWO.)

  1. Configure an AWS CodeDeploy deployment group with the production listener, a test listener, and two target groups, and select the CodeDeployDefault.ECSCanary10Percent30Minutes deployment configuration.Answer
  2. Create Amazon CloudWatch alarms to monitor the Application Load Balancer's 5XX count and target response time metrics, and configure the CodeDeploy deployment group to automatically roll back if these alarms are triggered.Answer
  3. C
    Configure an Amazon ECS service rolling update with a minimum healthy percent of 100% and a maximum percent of 200%, and enable the ECS deployment circuit breaker to monitor application response latency.
  4. D
    Create two separate Application Load Balancers for the old and new task sets, configure Route 53 weighted alias records with a 90:10 ratio, and associate Route 53 health checks to trigger rollbacks.
  5. E
    Configure AWS CodeDeploy with the CodeDeployDefault.ECSLinear10PercentEvery10Minutes deployment configuration, and write a custom AWS Lambda function to dynamically adjust target group weights during the deployment.

Answer

The correct actions are to configure an AWS CodeDeploy deployment group with the CodeDeployDefault.ECSCanary10Percent30Minutes deployment configuration, and to create Amazon CloudWatch alarms monitoring the Application Load Balancer's 5XX count and target response times to trigger automatic rollback in CodeDeploy.
The correct options implement a native AWS CodeDeploy canary deployment on Amazon ECS. Using the CodeDeployDefault.ECSCanary10Percent30Minutes configuration shifts exactly 10% of traffic to the new target group (green) and holds it for 30 minutes. To detect failures and automatically roll back, CloudWatch alarms for 5XX count and target response time must be associated with the CodeDeploy deployment group. The deployment shifts traffic by modifying Application Load Balancer target group weights, which avoids DNS caching issues.

Step-by-Step Solution

1
Select a canary traffic routing pattern in AWS CodeDeploy.
Using the CodeDeployDefault.ECSCanary10Percent30Minutes deployment configuration ensures 10% of traffic is routed to the new target group for exactly 30 minutes before shifting the rest.
This satisfies the requirement to route exactly 10% of traffic to the new version and validate it for 30 minutes.
2
Set up Application Load Balancer routing via CodeDeploy.
CodeDeploy updates the listener rules of a single ALB to direct traffic to two target groups (blue and green), adjusting weights without DNS caching impacts.
This avoids DNS caching issues and minimizes load balancer infrastructure costs.
3
Configure CloudWatch Alarms and link them to CodeDeploy's automatic rollback.
CloudWatch alarms monitor the ALB's HTTPCode_Target_5XX_Count and TargetResponseTime. CodeDeploy is configured to automatically roll back the deployment if these alarms transition to the ALARM state during the deployment window.
This provides automated, fast rollback capability if application latency or error rates spike.

Key Concept

Canary deployments on Amazon ECS using AWS CodeDeploy and Application Load Balancers
Rate this question