Question

Difficulty: MediumDeployment Strategy Design

A company is preparing to deploy a new version of a microservice that runs on Amazon ECS using the AWS Fargate launch type. The microservice is behind an Application Load Balancer (ALB). The solutions architect must design a deployment strategy that routes 10% of production traffic to the new version initially, pauses for 15 minutes to monitor for errors, and then shifts the remaining 90% of the traffic to the new version. If any application errors or elevated response times are observed during the deployment, the traffic must be immediately redirected back to the old version. Which two options should the solutions architect select to implement this deployment strategy? (Select two.)

  1. Configure the AWS CodeDeploy deployment group to use the CodeDeployDefault.ECSCanary10Percent15Minutes deployment configuration.Answer
  2. Create Amazon CloudWatch alarms for the Application Load Balancer target group metrics, and add these alarms to the rollback configuration of the CodeDeploy deployment group.Answer
  3. C
    Configure the ECS service deployment controller to use the ECS rolling update type, and specify a minimum healthy percent of 90%.
  4. D
    Configure the AWS CodeDeploy deployment group to use the CodeDeployDefault.ECSLinear10PercentEvery1Minutes deployment configuration.
  5. E
    Configure the Application Load Balancer listener rules with weighted target groups to route 10% of traffic to the new ECS service, and use an AWS Lambda function to increment the weight to 100% after 15 minutes.

Answer

Configure the AWS CodeDeploy deployment group to use the CodeDeployDefault.ECSCanary10Percent15Minutes deployment configuration, and create Amazon CloudWatch alarms for the Application Load Balancer target group metrics to add to the rollback configuration of the CodeDeploy deployment group.
The correct strategy uses AWS CodeDeploy to orchestrate an ECS blue/green deployment. The predefined configuration stating CodeDeployDefault.ECSCanary10Percent15Minutes routes 10% of traffic to the green target group for 15 minutes before routing 100%. Associating CloudWatch alarms for ALB target group metrics with the deployment group ensures that CodeDeploy automatically rolls back the deployment to the original task set if errors or latency spikes occur.

Step-by-Step Solution

1
Determine the required traffic-shifting pattern.
The requirement specifies shifting 10% of traffic to the new version, holding for 15 minutes, and then shifting the remaining 90% in a single step. This matches a canary deployment strategy.
This establishes that a canary strategy is required rather than a linear or rolling update strategy.
2
Select the correct AWS CodeDeploy deployment configuration.
Identify the CodeDeployDefault.ECSCanary10Percent15Minutes configuration as the native setting that aligns with the desired traffic-shifting parameters.
Using native predefined configurations simplifies deployment orchestration and avoids custom scripting.
3
Configure the rollback monitoring mechanism.
Create CloudWatch alarms for ALB target group metrics (e.g., target response time, HTTP 5xx count) and configure the CodeDeploy deployment group to automatically roll back the deployment if these alarms are triggered.
This satisfies the requirement to immediately redirect traffic back to the old version if any errors or elevated response times occur.

Key Concept

AWS CodeDeploy handles blue/green deployments for Amazon ECS by using Application Load Balancer target groups to shift traffic. Predefined deployment configurations, such as Canary, allow a solutions architect to shift a specific percentage of traffic for a set period before shifting the rest. Automated rollbacks are configured by associating CloudWatch alarms directly with the CodeDeploy deployment group.
Rate this question