AWS Security ChangesHomeSearch

AWS AmazonECS documentation change

Service: AmazonECS · 2025-07-18 · Documentation low

File: AmazonECS/latest/developerguide/service-rebalancing.md

Summary

Added troubleshooting section and best practices for service rebalancing, improved formatting, added CLI example, and clarified placement strategy requirements

Security assessment

The changes focus on operational reliability and availability zone balancing mechanics rather than addressing security vulnerabilities. While availability improvements can indirectly support system resilience, there's no direct evidence of security vulnerability remediation or new security features being documented.

Diff

diff --git a/AmazonECS/latest/developerguide/service-rebalancing.md b/AmazonECS/latest/developerguide/service-rebalancing.md
index cb2420385..dfebb83df 100644
--- a//AmazonECS/latest/developerguide/service-rebalancing.md
+++ b//AmazonECS/latest/developerguide/service-rebalancing.md
@@ -5 +5 @@
-How Amazon ECS detects uneven task distributionConsiderations for configuring Availability Zone rebalancingPlacement strategies and placement constraints with Availability Zone rebalancingTurn on Availability Zone rebalancing
+How Amazon ECS detects uneven task distributionConsiderations for configuring Availability Zone rebalancingPlacement strategies and placement constraints with Availability Zone rebalancingTurn on Availability Zone rebalancingTroubleshooting service rebalancingBest practices for service rebalancing
@@ -9 +9,7 @@ How Amazon ECS detects uneven task distributionConsiderations for configuring Av
-To help your applications achieve high availability, we recommend configuring your multi-task services to run across multiple Availability Zones. For services that specify their first placement strategy to be Availability Zone spread, AWS makes a best effort to evenly distribute service tasks across the available Availability Zones. However, there might be times when the number of tasks running in one Availability Zone is not the same as in other Availability Zones, such as after an Availability Zone disruption. To address this task imbalance, you can enable the Availability Zone rebalancing feature. With Availability Zone rebalancing, Amazon ECS continuously monitors the distribution of tasks across Availability Zones for each of your services. When Amazon ECS detects an uneven task distribution, it automatically takes action to rebalance the workload across Availability Zones. This involves launching new tasks in the Availability Zones with the fewest tasks and terminating tasks in the overloaded Availability Zones. This redistribution ensures no single Availability Zone becomes a point of failure, helping maintain the overall availability of your containerized applications. The automated rebalancing process eliminates the need for manual intervention, speeding the time to recovery after an event. 
+To help your applications achieve high availability, we recommend configuring your multi-task services to run across multiple Availability Zones. For services that specify their first placement strategy to be Availability Zone spread, AWS makes a best effort to evenly distribute service tasks across the available Availability Zones.
+
+However, there might be times when the number of tasks running in one Availability Zone is not the same as in other Availability Zones, such as after an Availability Zone disruption. To address this task imbalance, you can enable the Availability Zone rebalancing feature.
+
+With Availability Zone rebalancing, Amazon ECS continuously monitors the distribution of tasks across Availability Zones for each of your services. When Amazon ECS detects an uneven task distribution, it automatically takes action to rebalance the workload across Availability Zones. This involves launching new tasks in the Availability Zones with the fewest tasks and terminating tasks in the overloaded Availability Zones.
+
+This redistribution ensures no single Availability Zone becomes a point of failure, helping maintain the overall availability of your containerized applications. The automated rebalancing process eliminates the need for manual intervention, speeding the time to recovery after an event.
@@ -32 +38 @@ The following is an overview of the Availability Zone rebalancing process:
-Amazon ECS determines an imbalance in the number of tasks running in each Availability Zone by dividing the service’s desired task count by the number of configured Availability Zones. If the desired task count doesn’t divide evenly, Amazon ECS distributes the remainder of tasks evenly across the configured Availability Zones. Each Availability Zone must have at least one task.
+Amazon ECS determines an imbalance in the number of tasks running in each Availability Zone by dividing the service's desired task count by the number of configured Availability Zones. If the desired task count doesn't divide evenly, Amazon ECS distributes the remainder of tasks evenly across the configured Availability Zones. Each Availability Zone must have at least one task.
@@ -69 +75,9 @@ Consider the following when you want to configure Availability Zone rebalancing:
-Placement strategies determine how Amazon ECS selects container instances and Availability Zones for task placement termination. Task placement constraints are rules that determine whether a task is allowed to run on a specific container instance. For the EC2 launch type, you can use placement strategies and placement constraints in conjunction with Availability Zone rebalancing. However, for Availability Zone rebalancing to work, the Availability Zone spread placement strategy must be the first strategy specified. Availability Zone rebalancing is compatible with various placement strategy combinations. For example, you can create a strategy that first distributes tasks evenly across Availability Zones, and then bin packs tasks based on memory within each Availability Zone. In this case, Availability Zone rebalancing works because the Availability Zone spread strategy is specified first. It's important to note that Availability Zone rebalancing won't work if the first strategy in the placement strategy array is not an Availability Zone spread component. This requirement ensures that the primary focus of task distribution is maintaining balance across Availability Zones, which is crucial for high availability. For more information about task placement strategies and constraints, see [How Amazon ECS places tasks on container instances](./task-placement.html).
+Placement strategies determine how Amazon ECS selects container instances and Availability Zones for task placement termination. Task placement constraints are rules that determine whether a task is allowed to run on a specific container instance.
+
+For the EC2 launch type, you can use placement strategies and placement constraints in conjunction with Availability Zone rebalancing. However, for Availability Zone rebalancing to work, the Availability Zone spread placement strategy must be the first strategy specified.
+
+Availability Zone rebalancing is compatible with various placement strategy combinations. For example, you can create a strategy that first distributes tasks evenly across Availability Zones, and then bin packs tasks based on memory within each Availability Zone. In this case, Availability Zone rebalancing works because the Availability Zone spread strategy is specified first.
+
+It's important to note that Availability Zone rebalancing won't work if the first strategy in the placement strategy array is not an Availability Zone spread component. This requirement ensures that the primary focus of task distribution is maintaining balance across Availability Zones, which is crucial for high availability.
+
+For more information about task placement strategies and constraints, see [How Amazon ECS places tasks on container instances](./task-placement.html).
@@ -96 +110,74 @@ Existing | [UpdateService](https://docs.aws.amazon.com/AmazonECS/latest/APIRefer
-New | [CreateService](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateService.html) |  [Creating an Amazon ECS service using the console](./create-service-console-v2.html) | [create-service](https://docs.aws.amazon.com/cli/latest/reference/ecs/create-service.html)  
+New | [CreateService](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateService.html) |  [Creating an Amazon ECS rolling update deployment](./create-service-console-v2.html) | [create-service](https://docs.aws.amazon.com/cli/latest/reference/ecs/create-service.html)  
+  
+The following example shows how to enable service rebalancing when creating a new service:
+    
+    
+    aws ecs create-service \
+        --cluster my-cluster \
+        --service-name my-service \
+        --task-definition my-task-definition:1 \
+        --desired-count 6 \
+        --availability-zone-rebalancing ENABLED
+
+## Troubleshooting service rebalancing
+
+If you encounter issues with service rebalancing, consider the following troubleshooting steps:
+
+Rebalancing doesn't start
+    
+
+Verify that:
+
+  * Service rebalancing is enabled for your service
+
+  * Your service uses a supported configuration (see Considerations for configuring Availability Zone rebalancing)
+
+  * Your service has reached a steady state
+
+
+
+
+Task placement failures during rebalancing
+    
+
+If you see `SERVICE_TASK_PLACEMENT_FAILURE` events:
+
+  * For EC2 launch type: Check if you have container instances available in the target Availability Zone
+
+  * For Fargate launch type: Check if there are resource constraints or service quotas limiting task placement
+
+  * Review your task placement constraints to ensure they're not preventing proper task distribution
+
+
+
+
+Rebalancing stops unexpectedly
+    
+
+If you see `SERVICE_REBALANCING_STOPPED` events:
+
+  * Check for task protection that might be blocking the operation
+
+  * Look for concurrent service deployments that could interrupt rebalancing
+
+  * Review service events for additional information about why rebalancing stopped
+
+
+
+
+## Best practices for service rebalancing
+
+Follow these best practices to get the most out of service rebalancing:
+
+  * **Monitor rebalancing operations** \- Set up CloudWatch alarms to monitor service events related to rebalancing to quickly identify any issues.
+
+  * **Consider performance impact** \- Be aware that rebalancing operations may temporarily increase resource usage as new tasks are started before old ones are stopped.
+
+  * **Use task protection strategically** \- If you have critical tasks that shouldn't be terminated during rebalancing, consider using task protection.
+
+  * **Plan for EC2 capacity** \- For EC2 launch type, ensure you have sufficient container instances across all Availability Zones to support effective rebalancing.
+
+  * **Test rebalancing behavior** \- Before relying on rebalancing in production, test how your services behave during rebalancing operations in a non-production environment.
+
+
+
@@ -104 +191 @@ To use the Amazon Web Services Documentation, Javascript must be enabled. Please
-Services
+Viewing service revision details