Courseiva
SDLC Automation →mediumMultiple Choice

DOP-C02 Canary deployment ECS Practice Question

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?

⚠ Common exam trap

Test-takers frequently 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.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

AWS CodeDeploy with ECS blue/green deployment

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.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Amazon ECS Service Auto Scaling

    Why it's wrong here

    Amazon ECS Service Auto Scaling only adjusts the desired task count of an existing service based on CloudWatch metrics or target tracking policies. It continuously runs the same task set and image, so it can scale capacity up or down but cannot direct a controlled percentage of traffic to a new application version. Because it has no traffic-shifting or task-set replacement capability, it cannot implement a canary deployment.

  • ✓

    AWS CodeDeploy with ECS blue/green deployment

    Why this is correct

    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.

  • ✗

    Amazon Route 53 weighted routing

    Why it's wrong here

    Amazon Route 53 weighted routing shifts traffic at the DNS layer between independent endpoints, such as separate load balancers or service names, not between task sets inside a single ECS service. Using it would require running two fully separate ECS services or environments and would suffer from DNS TTL caching, making precise, fast traffic shifting impractical. It cannot manage task set health, integrate with ECS deployment events, or roll back atomically, so it is not a valid ECS canary deployment mechanism.

  • ✗

    AWS App Mesh with traffic shifting

    Why it's wrong here

    AWS App Mesh traffic shifting uses virtual routers and virtual node weights to gradually send a percentage of HTTP/gRPC traffic to a different version of a service. However, this requires an Envoy sidecar mesh and only controls traffic routing; it does not orchestrate the ECS task set lifecycle, health check integration, or automatic rollback. While it can complement a deployment, App Mesh alone cannot replace the deployment control plane that CodeDeploy provides, so it is not the best answer here.

Option-by-option analysis

Why each answer is right or wrong

Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The DOP-C02 exam frequently reuses these exact scenarios with slightly different constraints.

✓AWS CodeDeploy with ECS blue/green deploymentCorrect answer▾

Why this is correct

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.

✗Amazon ECS Service Auto ScalingWrong answer — click to see why▾

Why this is wrong here

Auto Scaling adjusts the number of tasks, not traffic shifting between versions.

✗Amazon Route 53 weighted routingWrong answer — click to see why▾

Why this is wrong here

Route 53 can distribute traffic across multiple endpoints, but it's not the native way for ECS service deployments.

✗AWS App Mesh with traffic shiftingWrong answer — click to see why▾

Why this is wrong here

App Mesh provides traffic splitting, but ECS natively integrates with CodeDeploy for canary deployments.

Analysis generated from the official DOP-C02blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”

About these practice questions

This DOP-C02 question is part of Courseiva's 1,298-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DOP-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DOP-C02 exam.