Skip to main content

πŸ›‘οΈ AWS ECS Service is underutilized🟒

Stats​

not available

Logic​

Description​

Open File

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.

Remediation​

Open File

Remediation​

Right-Size the ECS Service​

Review CPU and memory utilization, running task counts, and recent deployments in CloudWatch and Amazon ECS. Check peak demand, metric coverage, and latency over a representative workload cycle. Choose smaller tasks when individual tasks have headroom, or fewer replicas when the service can meet its availability and throughput requirements with a lower task count.

Record the current task definition ARN, desired count, and Service Auto Scaling settings before making changes. Test the proposed capacity under representative load. For services managed through infrastructure as code, apply the change through the existing deployment process.

Using the AWS CLI​
Reduce the Task Size​
  1. Prepare a task definition registration file with the lower CPU or memory allocation. Preserve unrelated settings and confirm that container reservations and limits fit the new task size. For Fargate, choose a supported CPU and memory combination. Supported Fargate task sizes

... see more

policy.yaml​

Open File

Linked Framework Sections​

SectionSub SectionsInternal RulesPoliciesFlagsCompliance
πŸ’Ό Cloudaware Framework β†’ πŸ’Ό Resource Right-Sizing26no data
πŸ’Ό Cloudaware Framework β†’ πŸ’Ό Workload Efficiency31no data