Skip to main content

Use Case for ECS Task Underutilization Check

  1. Configure ECS Task Underutilization Check
  2. Use Case for ECS Task Underutilization Check
  3. Triage Guides by Violation Type
    1. Triage ECS Task Underutilization Check CPU_UNDERUTILIZATION
    2. Triage ECS Task Underutilization Check MEMORY_UNDERUTILIZATION

ECS Task Underutilization Policy

Why use this policy?

ECS tasks can sometimes be overprovisioned, leading to wastage of resources and higher costs. This policy helps detect tasks that use less CPU and memory resources than configured thresholds, indicating they may be underutilized and potential candidates for optimization.

How does this policy work?

  • It retrieves CPU and Memory utilization metrics from CloudWatch for the specified ECS Task.
  • Compares average resource utilization against set thresholds.
  • Checks if the task age exceeds a certain number of days before it's considered for evaluation.

Configuration Variables

  • cpuUtilizationThreshold: Percentage threshold for CPU utilization below which a task is considered underutilized. Defaults to 10%.
  • memoryUtilizationThreshold: Percentage threshold for memory utilization. Defaults to 10%.
  • taskAgeThreshold: The number of days a task should have been running before being evaluated. Defaults to 30 days.

Violation Types

  • CPU_UNDERUTILIZATION: Triggered if the CPU utilization is below the threshold.
  • MEMORY_UNDERUTILIZATION: Triggered if the Memory utilization is below the threshold.

There is a clear distinction between the violation types as they reflect underutilization of different resources (CPU vs. Memory).