DOP-C02 Practice Question 32: ECS Deployment Circuit Breaker
AWS Certified DevOps Engineer – Professional (DOP-C02) · Test 4 · question 2 of 10
An Amazon ECS service on AWS Fargate uses the rolling update (ECS) deployment controller behind an Application Load Balancer. When a bad task definition is deployed, tasks crash on startup and ECS keeps launching replacements for an hour while the deployment stays IN_PROGRESS, until an on-call engineer notices and redeploys the previous task definition by hand. The team wants ECS itself to declare the deployment failed and put the previous task definition back. They are not willing to change the deployment controller or to provision a second target group.
What should the team do?
Show answer and explanation
Answer:
The deployment circuit breaker is described as "the rolling update mechanism that determines if the tasks reach a steady state," and it "has an option that will automatically roll back a failed deployment to the deployment that is in the COMPLETED state." When the failure count reaches the threshold, the deployment moves to FAILED, stops launching tasks, and, with rollback enabled, ECS starts a new deployment from the last completed one. It is supported only for services using the rolling update deployment controller, which is what this service already uses, so nothing about the deployment model or the load balancer has to change.
Option A protects capacity but never ends the bad deployment. With no healthy new tasks, ECS simply keeps trying within those percentages for as long as the deployment lasts, which is the behavior being complained about.
Option B makes ECS notice an unhealthy task faster, and therefore churn faster. Health check tuning has no concept of a failed *deployment*, so the deployment still never fails and never rolls back.
Option D would give automatic rollback, but it changes the deployment controller and an ECS blue/green deployment requires two target groups, both explicitly ruled out by the stem.
Reference: How the Amazon ECS deployment circuit breaker detects failures