Description
Identify running Amazon ECS services whose CPU and memory use are low compared with their task allocations over a 14-day window. Review whether smaller tasks or fewer replicas can meet the workload's needs.
Rationaleβ
ECS measures service CPU and memory use relative to configured task resources. Reducing a Fargate task size or replica count can reduce billable capacity. On EC2, a change can free task reservations for placement, and direct compute savings depend on a later reduction of the backing fleet.
Auditβ
This policy marks an AWS ECS Service as INCOMPLIANT if CloudWatch: CPU Utilization, 14-Day and CloudWatch: Memory Utilization, 14-Day are both below 40%, and at least one is 1% or higher. Services with both averages below 1% are marked INAPPLICABLE. An eligible service is COMPLIANT if either average is 40% or higher.
The policy evaluates ACTIVE services with REPLICA scheduling that were created at least 14 UTC calendar days ago. Running Count must be positive and match Desired Count, and Pending Count must be zero. Assessment requires both 14-day averages. Confirm recent metric coverage and peak demand before resizing.