Question

Difficulty: Very hardDeployment Strategy Design

An enterprise is designing a deployment pipeline for a critical, low-latency microservice deployed across multiple AWS Regions. The microservice is hosted on Amazon ECS using AWS Fargate, and uses Amazon DynamoDB global tables as its data tier. The business requirements specify that any update to the application must minimize the blast radius and guarantee zero downtime. Specifically, the deployment must:

1. Deploy updates sequentially from one Region to the next.
2. Within each Region, route exactly 10%10\% of the live traffic to the new version for a 1515-minute evaluation period before shifting the remaining traffic.
3. Automatically roll back the deployment in the current Region if the synthetic transaction success rate falls below 99.5%99.5\% or if regional system health alarms are triggered.
4. Immediately halt the entire global deployment pipeline if any single Region experiences a deployment failure or rollback.

Which architecture should a solutions architect recommend to satisfy these requirements?

  1. Configure an AWS CodePipeline with sequential stages for each AWS Region. In each stage, invoke AWS CodeDeploy to execute an ECS Blue/Green deployment using the CodeDeployDefault.ECSCanary10Percent15Minutes traffic-shifting configuration. Associate Amazon CloudWatch alarms monitoring the synthetic transaction success rate and regional system health with the CodeDeploy deployment group. Configure CodeDeploy to automatically roll back the deployment if these alarms are triggered, which will transition the CodePipeline stage to a failed state and halt the pipeline.Answer
  2. B
    Configure AWS CloudFormation StackSets to update the ECS service across all Regions in parallel. Set the CloudFormation UpdatePolicy on the ECS service to perform a rolling update with MinimumHealthyPercent set to 90%90\% and MaximumPercent set to 100%100\%. Create a CloudWatch alarm in each Region that monitors the synthetic transaction success rate, and use an AWS Lambda helper function triggered by the alarm to delete the stack and trigger a rollback if the success rate falls below the threshold.
  3. C
    Configure an AWS CodePipeline that deploys updates to all target Regions simultaneously. In the pipeline, use AWS CodeDeploy to perform an ECS deployment using the CodeDeployDefault.ECSLinear10PercentEvery1Minute traffic-shifting configuration. Implement Amazon Route 53 weighted routing to split traffic between the new and old target groups in each Region, and write a custom script in AWS CodeBuild to monitor CloudWatch alarms and execute a rollback if a failure is detected.
  4. D
    Configure AWS CloudFormation StackSets with a sequential deployment order using the MaxConcurrentCount parameter set to 11. In the CloudFormation template, configure the ECS service to use the ECS rolling update deployment controller. Write a custom AWS Lambda task in the pipeline to monitor the synthetic transaction success rate for 1515 minutes and, if the success rate is healthy, manually update Route 53 DNS records to shift the remaining 90%90\% of traffic to the new task set.

Answer

Configure an AWS CodePipeline with sequential stages for each AWS Region, using AWS CodeDeploy in each stage to execute an ECS Blue/Green deployment with the CodeDeployDefault.ECSCanary10Percent15Minutes traffic-shifting configuration, and configuring automatic rollbacks using CloudWatch alarms integrated with CodeDeploy.
The correct answer orchestrates the deployment sequentially using AWS CodePipeline stages, executes the canary traffic-shifting natively using AWS CodeDeploy's ECS Canary configuration, and registers CloudWatch alarms directly with CodeDeploy to ensure automated rollback. A rollback in CodeDeploy will fail the pipeline stage, successfully halting the downstream deployment to other Regions.

Step-by-Step Solution

1
Select the orchestration tool for multi-region coordination.
AWS CodePipeline is selected with sequential stages, ensuring that a failure in an earlier stage halts execution of subsequent stages.
Sequential execution and pipeline halting on failure are native features of CodePipeline stages.
2
Select the deployment controller and configuration for traffic shifting.
AWS CodeDeploy is selected to run ECS Blue/Green deployment using the CodeDeployDefault.ECSCanary10Percent15Minutes deployment configuration.
This configuration shifts 10%10\% of traffic to the replacement task set and waits 1515 minutes before shifting the remaining 90%90\%, satisfying the canary requirement.
3
Configure the automated rollback mechanism.
CloudWatch alarms monitoring the synthetic transaction success rate and regional system health are registered with the CodeDeploy deployment group.
CodeDeploy automatically monitors these alarms during the traffic-shifting phase and triggers an immediate rollback if they enter the ALARM state.

Key Concept

Orchestrating multi-region canary deployments with automated rollbacks using AWS CodePipeline and AWS CodeDeploy.
Rate this question