# ECS deployment failed: Deployment Circuit Breaker was triggered

AWS error fixes · Updated 17 November 2026

**Short answer:** The circuit breaker stopped your ECS rolling deployment because too many new tasks failed to start or failed their health checks. By default the threshold is half the service's desired count, at least 3 and at most 200. The breaker is only the messenger: the real cause is in the stopped tasks' stoppedReason (image pull, secrets, crash, health check). If rollback is on, ECS has already gone back to the last completed deployment.

## Where you see it

- **Service events**: `(service web) (deployment ecs-svc/1234567890) deployment failed: tasks failed to start.`
- **describe-services**: the deployment's `rolloutState` is `FAILED` with `rolloutStateReason` `ECS deployment circuit breaker: tasks failed to start.`
- **CloudFormation**: the `AWS::ECS::Service` resource fails with `Error occurred during operation 'ECS Deployment Circuit Breaker was triggered'` and the stack rolls back.

```
aws ecs describe-services --cluster prod --services web \
  --query 'services[0].deployments[].{id:id,status:status,rollout:rolloutState,reason:rolloutStateReason,taskDef:taskDefinition}'
```

## Find the real cause

Look at the tasks the failed deployment started:

```
TASKS=$(aws ecs list-tasks --cluster prod --service-name web --desired-status STOPPED \
  --query 'taskArns[:5]' --output text)
aws ecs describe-tasks --cluster prod --tasks $TASKS \
  --query 'tasks[].{reason:stoppedReason,code:stopCode,containers:containers[].[name,exitCode,reason]}'
```

| stoppedReason | Go to |
|---|---|
| `CannotPullContainerError` | [image pull failures](https://cloudconsole.dev/errors/ecs-cannotpullcontainererror) |
| `ResourceInitializationError` | [secrets, logs or ENI setup](https://cloudconsole.dev/errors/ecs-resourceinitializationerror) |
| `Essential container in task exited` | [the app crashed](https://cloudconsole.dev/errors/ecs-essential-container-exited); read its logs |
| `Task failed ELB health checks` | [target group health](https://cloudconsole.dev/errors/ecs-task-failed-elb-health-checks) |
| `Task failed container health checks` | [container health check](https://cloudconsole.dev/errors/ecs-task-failed-container-health-checks) |

## How the threshold works

The breaker checks two stages: whether new tasks reach `RUNNING`, then whether running tasks pass ELB, Cloud Map and container health checks. By default the threshold is `BOUNDED_PERCENT` with value 50: half the desired count, rounded up, clamped between 3 and 200. A service with 2 tasks therefore needs 3 failures; a service with 40 needs 20. By default the count resets whenever a task becomes healthy (`resetOnHealthyTask`), so only consecutive failures count. Both the threshold type and the reset behaviour are now configurable in the deployment configuration.

## Fix and redeploy

1. Fix the cause above, register a new task definition revision, then deploy it with `aws ecs update-service --cluster prod --service web --task-definition web:43`.
2. If the breaker had **rollback off**, the service is left with a failed deployment and no new tasks; deploy a known-good revision to recover. See [roll back an ECS deployment](https://cloudconsole.dev/how-to/roll-back-ecs-deployment).
3. If tasks are slow to become healthy rather than broken, raise `healthCheckGracePeriodSeconds` on the service or the container health check's `startPeriod`, instead of loosening the breaker.
4. With no earlier `COMPLETED` deployment (a brand-new service), there's nothing to roll back to and the deployment simply stalls.

## Questions

### What does ECS deployment circuit breaker was triggered mean?

Enough new tasks failed to start or failed health checks during a rolling deployment that ECS marked the deployment FAILED, and rolled back if rollback is enabled.

### How many failures trigger the ECS circuit breaker?

By default half the desired task count, rounded up, with a minimum of 3 and a maximum of 200. The threshold type and value are configurable.

### How do I see why tasks failed to start?

List the service's STOPPED tasks and run aws ecs describe-tasks; stoppedReason and each container's reason give the cause.

## When this happens away from your desk

A tripped circuit breaker usually means a release went out and came straight back. CloudConsole, a phone app for AWS, is being built to show ECS service events, stopped tasks and alarms on your phone, so you can see what failed before you're back at a laptop.

[About the CloudConsole app](https://cloudconsole.dev/aws-console-app) · [Download on the App Store](https://apps.apple.com/app/cloudconsole-for-aws/id6835419710)

## Sources

- [How the Amazon ECS deployment circuit breaker detects failures](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-circuit-breaker.html)
- [Amazon ECS stopped task error codes](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/stopped-task-error-codes.html)

## Related

- [How to check ECS service events](https://cloudconsole.dev/how-to/check-ecs-service-events)
- [How to roll back an ECS deployment](https://cloudconsole.dev/how-to/roll-back-ecs-deployment)
- [aws ecs describe-services](https://cloudconsole.dev/cli/ecs-describe-services)
- [Essential container in task exited](https://cloudconsole.dev/errors/ecs-essential-container-exited)
- [CannotPullContainerError: pull image manifest has been retried](https://cloudconsole.dev/errors/ecs-cannotpullcontainererror)
- [Task failed container health checks (Amazon ECS)](https://cloudconsole.dev/errors/ecs-task-failed-container-health-checks)
- [ECS deployment circuit breaker](https://cloudconsole.dev/config/ecs-deployment-circuit-breaker)

---

Source: https://cloudconsole.dev/errors/ecs-deployment-circuit-breaker

CloudConsole is an independent iPhone and Android app for Amazon Web Services by Cloudconcur Ltd. It is not affiliated with Amazon Web Services.
