An enterprise is designing a deployment pipeline for a critical online transaction processing API hosted on Amazon ECS with AWS Fargate, fronted by an Application Load Balancer (ALB). The API is highly sensitive to service disruptions, and any new deployment must support an automated rollback that completes in under 60 seconds if the containerized application logs an elevated rate of HTTP 5XX errors. The development team proposes using AWS CloudFormation to manage the stack, utilizing the default ECS deployment controller with a rolling update strategy, setting the minimum healthy percent to 100% and the maximum percent to 200%. What is the primary risk associated with this proposed strategy, and what is the most effective way to redesign the deployment pipeline to meet the rollback requirements?
- A rolling update rollback requires CloudFormation or ECS to launch new tasks of the previous version and wait for them to pass health checks, which exceeds the 60-second target. The pipeline should be redesigned to use the AWS CodeDeploy blue/green deployment controller (CODE_DEPLOY), configuring CloudWatch alarms for ALB 5XX errors that trigger an immediate rollback by shifting traffic back to the original task set at the load balancer level.Cevap
- BThe rolling update strategy cannot detect application-level 5XX errors without custom integration. The pipeline should be redesigned to enable the ECS deployment circuit breaker with automatic rollback, which monitors container exit codes and health status, allowing ECS to instantly restart the previous version's stopped tasks on the Fargate infrastructure within 60 seconds.
- CA rolling update will result in a temporary capacity reduction if tasks fail, violating the zero-downtime requirement. The pipeline should be redesigned to deploy a second ECS service in the CloudFormation template, using Route 53 weighted routing policies with a low TTL (5 seconds) to shift traffic, and configuring Route 53 DNS failover to automatically route all traffic back to the primary service if the new service health check fails.
- DA rolling update rollback must be initiated manually, which prevents the 60-second automation target. The pipeline should be redesigned to use CloudFormation Rollback Triggers associated with a CloudWatch alarm for 5XX errors, allowing CloudFormation to automatically initiate a stack rollback that instantly reinstates the original task definition's configuration and routes traffic back to the active containers.