Description
Identify running Amazon ECS replica services whose CPU and memory averages are near zero over 14 days. This is a candidate for an owner review of workload activity and retirement.
Rationaleβ
An unused service can continue to consume Fargate task capacity or hold reservations on EC2. Scheduled jobs, low-frequency consumers, and standby services can have similarly low averages while serving a valid purpose.
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 1%.
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. This excludes currently scaled-to-zero services and services with unsettled task counts. Eligible services with either average at or above 1% are COMPLIANT.