Review ECS Container Insights settings

Collect the operational information you need through ECS Container Insights.

Description

If an ECS cluster omits containerInsights, check the account setting that applied when the cluster was created. ECS also collects basic metrics independently.

Potential impact

Without detailed CPU and memory metrics, it can take longer to find which service is short of resources.

Remediation

In the cluster’s setting block, set name = "containerInsights" and value = "enabled". For more container-level detail, check whether your provider supports enhanced. Review collection permissions and costs.

Examples

Before

hcl
resource "aws_ecs_cluster" "example" {
  name = "white-hart"
}

After

hcl
resource "aws_ecs_cluster" "example" {
  name = "white-hart"

  setting {
    name  = "containerInsights"
    value = "enabled"
  }
}

After applying the change, check that the CloudWatch dashboard shows fresh data for white-hart and that its alarms notify the intended responders.

References