AWS Security ChangesHomeSearch

AWS AmazonECS documentation change

Service: AmazonECS · 2025-11-19 · Documentation low

File: AmazonECS/latest/developerguide/managed-instances-infrastructure-optimization.md

Summary

Restructured documentation to detail Idle Instance Detection, Underutilized Instance Detection, and ScaleInAfter configuration. Added operational details about instance deregistration/draining processes and workload consolidation logic.

Security assessment

The changes focus on infrastructure optimization mechanisms and operational processes for cost management. While they describe instance lifecycle management (DEREGISTERING/DRAINING states), there's no mention of security vulnerabilities, access controls, encryption, or authentication mechanisms. The ScaleInAfter configuration relates to timing of resource management actions rather than security controls.

Diff

diff --git a/AmazonECS/latest/developerguide/managed-instances-infrastructure-optimization.md b/AmazonECS/latest/developerguide/managed-instances-infrastructure-optimization.md
index 48ea503a6..46ac44f43 100644
--- a//AmazonECS/latest/developerguide/managed-instances-infrastructure-optimization.md
+++ b//AmazonECS/latest/developerguide/managed-instances-infrastructure-optimization.md
@@ -5 +5 @@
-Intelligent idle detection and cost optimizationOperational excellence
+Idle Instance DetectionUnderutilized Instance DetectionScaleInAfter
@@ -9,3 +9 @@ Intelligent idle detection and cost optimizationOperational excellence
-Amazon ECS Managed Instances automatically optimizes infrastructure during the operational phase to optimize costs and performance. Successfully provisioned container instances actively serve your workloads while the system continuously optimizes for cost, performance, and reliability. Infrastructure optimization mechanisms ensure that your containerized applications execute reliably with optimal performance characteristics while automatically optimizing costs through intelligent resource management.
-
-The consolidation process operates transparently in the background, requiring no intervention from you while delivering significant cost savings and performance improvements. The system handles the details of resource optimization, performance monitoring, and workload migration so that you can focus on your applications and business objectives while benefiting from continuous infrastructure optimization.
+Amazon ECS Managed Instances automatically provisions right-sized EC2 instances based on your Capacity Provider configuration and current workload demands, ensuring your containerized applications have the appropriate compute resources from the moment they're deployed. As your application traffic patterns evolve and workload requirements change over time, Amazon ECS Managed Instances continuously monitors and optimizes your infrastructure by intelligently adjusting instance sizes to match current needs, proactively replacing instances that have drifted from optimal configurations, and dynamically balancing cost efficiency, application performance, and system reliability. This resource management system operates without any manual intervention, reducing infrastructure cost while maintaining high availability for your applications.
@@ -26 +24,5 @@ Infrastructure optimization has the following benefits:
-###### Note
+Amazon ECS Managed Instances performs two types of infrastructure optimizations to maximize efficiency and reduce costs:
+
+## Idle Instance Detection
+
+Identifies and removes EC2 instances that have no running tasks, eliminating unnecessary infrastructure costs from unused capacity. When an idle instance is detected, the optimization process marks the container instance as DEREGISTERING, which initiates the cleanup sequence that safely terminates the underlying EC2 instance.
@@ -28 +30 @@ Infrastructure optimization has the following benefits:
-Tasks with task scale-in protection enabled are not optimized using this process.
+## Underutilized Instance Detection
@@ -30 +32 @@ Tasks with task scale-in protection enabled are not optimized using this process
-## Intelligent idle detection and cost optimization
+Analyzes task distribution across instances to identify opportunities for better resource allocation. When tasks are running sub-optimally across multiple instances, Amazon ECS Managed Instances consolidates workloads onto fewer, more efficiently utilized instances, reducing overall costs while maintaining performance. The optimization process marks underutilized container instances as DRAINING, which triggers task replacement to move workloads to existing or new, more efficient instances. Once all tasks are safely migrated, the instance transitions to DEREGISTERING state and is cleaned up. This optimization applies to instances running service tasks and ensures safe consolidation by respecting your service's minimum and maximum task limits, honoring start-before-stop deployment behavior, and maintaining any task protection settings throughout the draining process. Instances running standalone tasks are not considered for optimization since ECS Managed instances does not replace standalone tasks.
@@ -32 +34 @@ Tasks with task scale-in protection enabled are not optimized using this process
-The system identifies when container instances are truly idle while trying to avoid premature termination that could impact application availability or deployment performance. The system respects the minimum and maximum number of tasks set for a service, the start before stop behavior, and the task protection behavior.
+These optimizations work together to ensure your infrastructure continuously adapts to actual workload demands, automatically eliminating waste and improving resource utilization without impacting application availability. Both mechanisms use event-driven monitoring that responds to task and instance lifecycle events to identify optimization opportunities in real-time. Amazon ECS Managed Instances detects when the last task stops on a container instance, indicating a potential idle condition for cost optimization. For underutilized instances, any task stop or new instance launch triggers analysis to identify opportunities for workload consolidation and improved resource efficiency.
@@ -34 +36 @@ The system identifies when container instances are truly idle while trying to av
-### Event-driven monitoring
+## ScaleInAfter
@@ -36 +38 @@ The system identifies when container instances are truly idle while trying to av
-The idle detection architecture uses event-driven monitoring that responds to task lifecycle events to identify when container instances transition to idle states. The system detects when the last task stops on a container instance, indicating a potential idle condition that might warrant cost optimization actions.
+Both infrastructure optimizations look for opportunities to terminate running instances to improve utilization and reduce costs. You can control the timing of these actions using the ScaleInAfter configuration in Amazon ECS Managed Instances capacity provider settings, which applies to both idle and underutilized instances.
@@ -38 +40 @@ The idle detection architecture uses event-driven monitoring that responds to ta
-The system implements delayed verification mechanisms that wait for predetermined periods before taking optimization actions, ensuring that brief idle periods during deployment operations do not trigger unnecessary instance termination.
+**Idle Instances**
@@ -40 +41,0 @@ The system implements delayed verification mechanisms that wait for predetermine
-### Cost optimization decision logic
@@ -42 +43 @@ The system implements delayed verification mechanisms that wait for predetermine
-The cost optimization decision process considers multiple factors to make optimal termination decisions:
+  * ECS waits for the specified duration after the last task stops before deregistering the instance
@@ -44 +45 @@ The cost optimization decision process considers multiple factors to make optima
-Historical usage analysis
+  * If a new task starts during the waiting period, the instance is no longer considered idle and termination is cancelled
@@ -47 +47,0 @@ Historical usage analysis
-Examines past usage patterns to identify instances that consistently remain idle for extended periods versus those that experience regular usage cycles
@@ -49 +48,0 @@ Examines past usage patterns to identify instances that consistently remain idle
-Deployment pattern analysis
@@ -50,0 +50 @@ Deployment pattern analysis
+**Underutilized Instances**
@@ -52 +51,0 @@ Deployment pattern analysis
-Considers the frequency and timing of application deployments to optimize termination timing for minimal customer impact
@@ -54 +53 @@ Considers the frequency and timing of application deployments to optimize termin
-Customer impact assessment
+  * ECS waits for the specified duration after a task stop event that results in the instance becoming underutilized before draining the instance
@@ -55,0 +55 @@ Customer impact assessment
+  * If a new task is launched or an existing task is stopped on a particular instance during the waiting period, the timer resets from either the most recent task stop or new task creation time, and Amazon ECS Managed Instances re-evaluates for inefficiencies and takes actions if necessary after the new waiting period expires
@@ -57 +56,0 @@ Customer impact assessment
-Evaluates the potential consequences of instance termination on your application availability, deployment performance, and overall experience
@@ -59 +57,0 @@ Evaluates the potential consequences of instance termination on your application
-## Operational excellence
@@ -61 +58,0 @@ Evaluates the potential consequences of instance termination on your application
-Amazon ECS Managed Instances handle the orchestration of idle detection algorithms, health monitoring, maintenance window coordination, and resource utilization optimization automatically, requiring no manual intervention from you.
@@ -63 +60 @@ Amazon ECS Managed Instances handle the orchestration of idle detection algorith
-The system continuously monitors your workloads and infrastructure to maintain optimal performance and availability while automatically handling operational tasks in the background.
+This configuration is optional. When not specified, ECS Managed Instances automatically determines optimal timing based on ECS Managed Instances default configuration.