AWS Builder Center

Amazon ECS Now Supports Configurable Deployment Circuit Breaker Settings

The rollback threshold and failure-counting mode for the ECS deployment circuit breaker are now configurable per service, letting you tailor rollback behavior to your application's characteristics. This post covers what changed, how the new logic works, and how to configure it.

Introduction

On July 1, 2026, AWS announced an update to the Amazon ECS deployment circuit breaker that lets you customize its settings. The headline change is that the failure threshold that triggers a rollback, which used to be a fixed value, can now be tuned to match the characteristics of each service.
If you run rolling deployments on ECS, you may have run into a deployment that got rolled back automatically because tasks became briefly unstable during startup, or the opposite problem: a production deployment where a real failure wasn't caught fast enough and the impact spread further than it should have. This update addresses that gap directly.
This post walks through what changed, how the new failure-detection logic works, and how to decide which settings fit your service. It's aimed at engineers who operate services on ECS and anyone interested in improving deployment stability and reliability.



What Is the Deployment Circuit Breaker?

The Amazon ECS deployment circuit breaker monitors task launch behavior during a rolling deployment and, once it detects a certain number of failures, automatically stops the deployment and rolls it back to the last stable state. Enabling it is enough to prevent a broken deployment from lingering in production indefinitely.
The circuit breaker tracks failures in two stages. In the first stage, it monitors whether tasks reach the  RUNNING  state. A task that repeatedly fails to start, whether from a failed image pull or an application error on launch, counts as a failure here. In the second stage, once a task reaches  RUNNING , the circuit breaker monitors its health checks. Tasks that keep failing load balancer or container health checks also count as failures.
Here's what that two-stage flow looks like:

Until now, the number of failures required to trigger a rollback was fixed by an AWS-defined formula that you couldn't change. Specifically, the threshold was automatically calculated as 50% of the desired count, bounded to a minimum of 3 and a maximum of 200, and that calculated value was always used as-is.



What Has Changed

As covered in the previous section, neither the failure threshold nor the way failures were counted could be customized. The threshold was always derived mechanically from the desired count, and the counting behavior was fixed to reset whenever a healthy task started.
That fixed behavior worked well for most services, but it didn't fit every application. An application prone to brief errors right after startup could get rolled back simply because a few failures happened to occur back to back, even though it would have stabilized given more time. On the other hand, a production environment that wanted to treat even a handful of failures as critical could find the fixed threshold too lenient to catch problems quickly.
With this update, you can now configure both the threshold and the counting mode per service, through two new settings:  resetOnHealthyTask  and  thresholdConfiguration .
 resetOnHealthyTask  controls how failures are counted. When set to  true  (the default), the failure count resets to 0 every time a task reaches a healthy state, so only consecutive failures count toward the threshold — the same behavior as before. When set to  false , failures accumulate throughout the deployment and the count never resets, even if a healthy task starts in between.
 thresholdConfiguration  controls how the threshold itself is calculated. The default,  BOUNDED_PERCENT , works the same way as before: it derives the threshold from a percentage of the desired count (50% by default), bounded to a minimum of 3 and a maximum of 200. The new  UNBOUNDED_PERCENT  type uses the same percentage-based calculation but removes the upper and lower bounds, which is useful for large-scale services that need a threshold proportional to their size. The other new type,  COUNT , uses a fixed failure count directly as the threshold rather than a percentage, which is useful when you want to tolerate a specific number of failures regardless of service size.
Here's a summary of what changed:
Setting
Before
After this update
Failure counting mode
Always resets (only consecutive failures count)
resetOnHealthyTask lets you choose whether it resets or not
Threshold calculation
Fixed at 50% of desired count (min 3, max 200)
thresholdConfiguration lets you choose BOUNDED_PERCENT (same as before), UNBOUNDED_PERCENT (no cap), or COUNT (a fixed number)
When you can configure it
Not configurable
Configurable at service creation or update
This update addresses the underlying problem that a single formula can't be optimal for every service, by letting you combine the counting mode and threshold calculation to fit each one.



Understanding the Failure-Counting Logic

 resetOnHealthyTask  is hard to picture from a description alone, so let's walk through a concrete sequence of task launch results to see how the failure count actually behaves.
To keep things simple, assume  thresholdConfiguration  is set to  COUNT  with a threshold of 3. During a deployment, tasks launch in the following order: failure, failure, success, failure, failure, failure.
With  resetOnHealthyTask  set to  true  (the default) — the same "count only consecutive failures" behavior as before — the failure count progresses like this:

Because Task 3 succeeds, the failure count resets to 0. As a result, the threshold of 3 isn't reached until Task 6. Since a healthy task did start along the way, the deployment is treated as recovering, and the rollback is delayed accordingly.
Now compare that with the same sequence of results under  resetOnHealthyTask=false , where failures accumulate instead:

Here, because the count doesn't reset even though Task 3 succeeded, the threshold of 3 is already reached by Task 4, triggering the rollback earlier.
Even with the exact same sequence of launch results, the  resetOnHealthyTask  setting changes when the rollback actually fires.



How to Choose Your Threshold and Counting Mode

We've now seen how  resetOnHealthyTask  affects counting behavior and how  thresholdConfiguration  affects the threshold calculation. When deciding on real settings, you need to weigh both of these against the characteristics of your own service.
Start with  resetOnHealthyTask , based on your application's startup behavior. If your application is prone to brief failures right after startup — waiting on a downstream connection or warming up a cache, for example — leaving it at  true  (the default), which only counts consecutive failures, is the better fit. If your application is normally stable at startup, setting it to  false  lets you detect a recurring pattern of problems throughout the deployment more quickly.
Next, choose  thresholdConfiguration  mainly based on your service's desired count. For a typical service with a desired count in the tens, the default  BOUNDED_PERCENT  works fine as-is. For a large-scale service with a desired count in the hundreds, the 200 cap in  BOUNDED_PERCENT  can make the threshold disproportionately small relative to the service's actual size — in that case,  UNBOUNDED_PERCENT  keeps the threshold proportional by removing the cap. Conversely, for a development or test environment with a small desired count where you want a fast rollback based on an exact number of failures rather than a percentage,  COUNT  makes your intent explicit.
Here are some example combinations:
Service characteristics
resetOnHealthyTask
thresholdConfiguration
Application prone to transient startup failures
true (default)
BOUNDED_PERCENT (default)
Large-scale production service (desired count in the hundreds)
false
UNBOUNDED_PERCENT
Development/test environment wanting a fast rollback
false
COUNT (a small fixed value)
Typical production service with stable startup behavior
false
BOUNDED_PERCENT (default)
These combinations are just examples, not a single correct answer. In practice, a reasonable approach is to start with the default settings, watch whether rollbacks fire at unexpected times or detection lags behind actual problems, and adjust from there.



Use Cases

Let's look at a few concrete situations where this update makes a difference.

Faster feedback loops in development and test environments

In development and test environments, you typically want to catch failures quickly without waiting for a percentage-based calculation. Setting  thresholdConfiguration  to  COUNT  with a small fixed value lets you detect startup failures caused by code or configuration issues as part of your CI/CD pipeline, before they reach later verification stages.

Applications with unstable startup during migration

During a migration to ECS, or while gradually modernizing a legacy application, you may be working with an application that fails intermittently at startup but stabilizes over time. Leaving  resetOnHealthyTask  at its default of  true  prevents unnecessary rollbacks from transient failures while the application itself is still being improved.

Scaling the threshold appropriately for large production services

For a service with a desired count in the hundreds, the 200 cap in  BOUNDED_PERCENT  can make the threshold disproportionately small for the service's actual scale. Combining  UNBOUNDED_PERCENT  with  resetOnHealthyTask=false  keeps the threshold proportional to scale while detecting accumulating failures across the deployment earlier.

Strengthening monitoring and alerting

While this update itself is about the circuit breaker's decision logic, it's worth pairing with Amazon EventBridge integration. ECS sends service deployment state-change events to EventBridge, and setting up a rule to monitor the  SERVICE_DEPLOYMENT_FAILED  event lets you detect a rollback the moment it happens and take manual action if needed. Combining tuned threshold and counting settings with this kind of monitoring lets you treat the circuit breaker as part of your ongoing operations, not just a one-time safety net.



Configuration

Let's walk through how to configure  resetOnHealthyTask  and  thresholdConfiguration  using the AWS CLI.
To create a new service, specify these settings as part of  deploymentCircuitBreaker  within the  --deployment-configuration  option of  create-service . The following command, based on the example in the official documentation, creates a service with a fixed failure count of 5 as the threshold and cumulative failure tracking.
aws ecs create-service \
--service-name <service-name> \
--deployment-controller type=ECS \
--desired-count <desired-count> \
--deployment-configuration "deploymentCircuitBreaker={enable=true,rollback=true,resetOnHealthyTask=false,thresholdConfiguration={type=COUNT,value=5}}" \
--task-definition <task-definition-family>:<revision> \
--launch-type FARGATE \
--platform-family LINUX \
--platform-version 1.4.0 \
--network-configuration "awsvpcConfiguration={subnets=[<subnet-id>],securityGroups=[<security-group-id>],assignPublicIp=ENABLED}"

To target a specific cluster, add  --cluster <cluster-name>  (the  default  cluster is used if you omit it).
The new parts introduced by this update are  resetOnHealthyTask=false  and  thresholdConfiguration  with  type=COUNT  and  value=5 . If you don't specify these,  resetOnHealthyTask=true  and  thresholdConfiguration={type=BOUNDED_PERCENT,value=50}  apply, which is the same behavior as before.
To update an existing service, use  update-service . The following example targets a large-scale service using  UNBOUNDED_PERCENT . This command is based on the syntax shown in the official documentation, with the new parameters added in; test it in a non-production environment before applying it to production.
aws ecs update-service \
--cluster <cluster-name> \
--service <service-name> \
--deployment-configuration '{
"deploymentCircuitBreaker": {
"enable": true,
"rollback": true,
"resetOnHealthyTask": false,
"thresholdConfiguration": {
"type": "UNBOUNDED_PERCENT",
"value": 50
}
}
}'

If you're enabling the circuit breaker for the first time, you still need to specify both  enable  and  rollback  together, just as before. If you're only changing the counting mode or threshold on a service that already has the circuit breaker enabled, you similarly need to specify the entire  deploymentCircuitBreaker  object again.
You can configure the same settings from the Amazon ECS console when creating or updating a service, in the deployment configuration section. Knowing the CLI parameter names makes it easier to identify the corresponding fields in the console.
According to the announcement,  resetOnHealthyTask  and  thresholdConfiguration  can also be configured through AWS CloudFormation, AWS CDK, and Terraform, in addition to the AWS Management Console, AWS CLI, and AWS SDKs. The exact property names and syntax for each of these tools weren't confirmed at the time of writing, so check the latest documentation for whichever tool you use.



What to Check Before You Adopt This

First, consider the impact on existing services. Unless you explicitly specify otherwise,  resetOnHealthyTask  and  thresholdConfiguration  default to  true  and  BOUNDED_PERCENT  (with a value of 50) respectively — the same behavior as before. This means existing services that already have the circuit breaker enabled won't change behavior unintentionally because of this update. You only need to explicitly configure the services where you actually want different settings.
Next, confirm where this applies. The deployment circuit breaker itself still only supports services that use the rolling update ( ECS ) deployment controller, and that hasn't changed with this update. It doesn't apply to services using blue/green deployments or an external deployment controller, so check which deployment controller your target service uses beforehand.
On availability: this feature is available in all AWS Regions where Amazon ECS is available, so you don't need to check region-by-region availability if you operate services across multiple regions.
Finally, on monitoring: as mentioned earlier, ECS sends service deployment state-change events to Amazon EventBridge. Setting up a rule to monitor the  SERVICE_DEPLOYMENT_FAILED  event lets you continuously track exactly when rollbacks fire after you change these settings. Treat the values you choose as something to keep adjusting based on real-world behavior, not a one-time decision.



Summary

With this update, the Amazon ECS deployment circuit breaker lets you tune both the failure-counting mode ( resetOnHealthyTask , consecutive or cumulative) and the threshold calculation ( thresholdConfiguration :  BOUNDED_PERCENT ,  UNBOUNDED_PERCENT , or  COUNT ) per service. The core of this update is that the parts you previously had to accept as AWS's fixed defaults — because no single formula fits every service — are now yours to tune.
Because existing behavior is preserved when you don't change anything, there's no need to rush changes on existing services. A practical approach is to keep running with the defaults, watch for rollbacks firing at unexpected times or detection lagging behind real problems, and adjust  resetOnHealthyTask  and  thresholdConfiguration  as needed. Pairing this with Amazon EventBridge monitoring lets you keep verifying the effect of your changes as you operate.
Automatic rollback on failed deployments isn't new, but this update lets you shape that behavior around your own application's characteristics and operational approach. If you run services on ECS, it's worth revisiting your circuit breaker settings with this in mind.



References

Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article