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 of the live traffic to the new version for a -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 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?
- 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
- BConfigure 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 and MaximumPercent set to . 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.
- CConfigure 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.
- DConfigure AWS CloudFormation StackSets with a sequential deployment order using the MaxConcurrentCount parameter set to . 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 minutes and, if the success rate is healthy, manually update Route 53 DNS records to shift the remaining of traffic to the new task set.