A DevOps team is designing a deployment pipeline for a microservices application on Amazon ECS using AWS CodePipeline. They want to implement a canary deployment strategy where a small percentage of traffic is routed to the new version before fully promoting it. Which AWS service or feature should they use to achieve this?
AWS CodeDeploy with ECS blue/green deployment is the native AWS service that performs canary traffic shifting for an ECS service. It creates a replacement task set from a new task definition, shifts traffic through load balancer target group weights (for example, 10 percent initially), waits a specified interval, and then shifts the remaining traffic after validation. It also supports lifecycle hooks, CloudWatch alarm rollback, and automatic cleanup of the old task set, making it the complete answer for a canary deployment.
Why this answer
AWS CodeDeploy with ECS blue/green deployment is the correct choice because it natively supports canary traffic shifting for Amazon ECS services. When integrated with AWS CodePipeline, CodeDeploy can route a small percentage of traffic (e.g., 10%) to the new task set, monitor it with CloudWatch alarms, and then automatically shift the remaining traffic after a specified interval. This is the only option that directly provides the canary deployment lifecycle within the ECS and CodePipeline context.
Exam trap
The trap here is that candidates often confuse Route 53 weighted routing (which operates at the DNS level and cannot shift traffic within a single ECS service) with the application-level traffic shifting needed for canary deployments, or they assume App Mesh is required when CodeDeploy already provides the native integration.
Why the other options are wrong
Auto Scaling adjusts the number of tasks, not traffic shifting between versions.
Route 53 can distribute traffic across multiple endpoints, but it's not the native way for ECS service deployments.
App Mesh provides traffic splitting, but ECS natively integrates with CodeDeploy for canary deployments.