Skip to main content

Description

Identify Amazon ECS on EC2 clusters where running tasks reserve much more CPU or memory than they use over the same 14-day reporting window.

Rationale​

Excess reservation can prevent ECS from placing new tasks and can trigger EC2 scale-out. This finding concerns task allocations. Reducing a reservation frees placement capacity, and direct savings depend on whether the freed capacity supports a later reduction in the EC2 fleet.

Audit​

This policy marks an AWS ECS Cluster as INCOMPLIANT if either of the following conditions holds.

  • CloudWatch: CPU Reservation, 14-Day is at least 80% and CloudWatch: CPU Utilization, 14-Day is below 40%.
  • CloudWatch: Memory Reservation, 14-Day is at least 80% and CloudWatch: Memory Utilization, 14-Day is below 40%.

The policy evaluates ACTIVE clusters with positive Running Tasks Count and Registered Container Instances Count, and at least one active container instance with a connected agent and linked running EC2 instance. Assessment requires all four 14-day averages. An eligible cluster is COMPLIANT if neither resource meets both thresholds.