An ECS service on Fargate rolls out a new task definition. If the replacement tasks keep failing to reach a healthy steady state, the team wants the deployment halted and the service returned automatically to the last working revision. Which deployment setting provides this?
Show answer and explanation
Answer: D
The ECS deployment circuit breaker tracks whether replacement tasks reach a steady state. It derives a failure threshold from the service's desired task count and marks the deployment as failed once that threshold is crossed. With rollback enabled, ECS redeploys the last completed task definition, so the service recovers without manual intervention.
Why the other options are wrong
- A. Service Auto Scaling adjusts the number of tasks based on metrics such as CPU or request count. It does not judge whether a new deployment is healthy or revert it.
- B. A capacity provider strategy decides how tasks are placed across Fargate and Fargate Spot capacity. It does not monitor deployment failures or trigger a rollback.
- C. Task definition revisions preserve history, and an operator can point the service at an older revision by hand. Nothing in that approach detects failed deployments or rolls them back automatically.