EC2 detailed monitoring disabled

Enable detailed monitoring when EC2 workloads need finer-grained metrics.

Description

Basic EC2 monitoring reports most instance metrics every five minutes. Detailed monitoring reports supported metrics every minute. Status checks already report every minute in either mode.

Potential impact

Brief spikes in CPU or network load can be hidden in five-minute aggregates.

Remediation

Set monitoring = true on instances that need one-minute visibility and review the additional cost. Check for one-minute data points in CloudWatch and configure alarms for the metrics that need a response.

Examples

The example keeps the same t3.micro instance, AMI and tags.

Before

hcl
resource "aws_instance" "example" {
  ami           = data.aws_ami.ubuntu.id
  instance_type = "t3.micro"

  tags = {
    Name = "HelloWorld"
  }
}

After

hcl
resource "aws_instance" "example" {
  ami           = data.aws_ami.ubuntu.id
  monitoring    = true
  instance_type = "t3.micro"

  tags = {
    Name = "HelloWorld"
  }
}

References