# CloudWatch alarm for EC2 CPUUtilization

CloudWatch alarms · Updated 16 November 2026

**Short answer:** Alarm on CPUUtilization for each instance (InstanceId) using the Average statistic, and go into ALARM when it is above 80% for 3 of 3 five-minute periods. With detailed monitoring enabled you can use a 60-second period instead. Treat it as a capacity warning, not proof of a problem: some workloads run hot by design.

## What CPUUtilization measures

`CPUUtilization` is the percentage of the instance's allocated compute that was in use, as measured by the hypervisor rather than the guest OS. That has two practical consequences:

- It can differ from `top` inside the instance, especially on burstable types.
- On a **T-family instance in standard mode**, the metric is measured against the full vCPU. When CPU credits run out, the instance is held at its baseline (for example 20% on some sizes), and `CPUUtilization` flattens at that baseline while the application crawls. An 80% alarm never fires. Alarm on `CPUCreditBalance` for those instances as well.

Without detailed monitoring, EC2 publishes this metric every five minutes, which is why the recommended period is 300 seconds.

## Recommended alarm settings

| Setting | Value |
|---|---|
| Namespace | `AWS/EC2` |
| Metric | `CPUUtilization` |
| Dimensions | `InstanceId` |
| Statistic | `Average` |
| Period | 300 seconds |
| Datapoints to alarm | 3 |
| Evaluation periods | 3 |
| Comparison operator | `GreaterThanThreshold` |
| Threshold | 80.0 (percent) |

As given in the CloudWatch [recommended alarms](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Best_Practice_Recommended_Alarms_AWS_Services.html) list. Three five-minute periods means CPU has been above 80% for a quarter of an hour, long enough to rule out a deploy or a cron job.

## Tuning

- **Look at history first.** If an instance sits at 85% every afternoon and nobody complains, 80% will page you daily. Raise the threshold or accept that this instance is sized to run hot.
- **Batch and worker instances** are supposed to use all their CPU. For them, alarm on queue age or job duration, not CPU.
- **Auto Scaling groups:** alarm on the group's average (`AutoScalingGroupName` dimension) rather than each instance, and let a target tracking policy handle routine load.
- **Faster detection:** with detailed monitoring on, use `--period 60` and around 10 evaluation periods to keep a similar time window.

## Create it

```
aws cloudwatch put-metric-alarm \
  --alarm-name web-01-cpu-high \
  --namespace AWS/EC2 \
  --metric-name CPUUtilization \
  --dimensions Name=InstanceId,Value=i-0123456789abcdef0 \
  --statistic Average \
  --period 300 \
  --evaluation-periods 3 \
  --datapoints-to-alarm 3 \
  --threshold 80 \
  --comparison-operator GreaterThanThreshold \
  --alarm-actions arn:aws:sns:eu-west-2:123456789012:ops-alerts \
  --region eu-west-2
```

The console path and email notifications are covered in [how to create a CloudWatch CPU alarm](https://cloudconsole.dev/how-to/create-cloudwatch-cpu-alarm) and [alarm email notifications](https://cloudconsole.dev/how-to/cloudwatch-alarm-email-notification).

## When it fires

1. **Is the application actually degraded?** Check response times and error rates. High CPU with normal latency is a capacity note, not an incident.
2. **Find the process.** Connect with [Session Manager](https://cloudconsole.dev/how-to/connect-to-ec2-with-session-manager) and run `top -o %CPU`. A runaway process, a stuck loop or an unexpected crypto-miner on a compromised host all show up here.
3. **Look for a trigger:** a traffic increase, a deploy, a cache that stopped working and pushed more work to this host.
4. **Add capacity if the load is real:** scale out behind the load balancer, or [move to a larger or compute-optimised instance type](https://cloudconsole.dev/how-to/change-ec2-instance-type).

## Questions

### What is a good CPU threshold for an EC2 alarm?

AWS suggests 70-80%, with 80% as the recommended value. Adjust it after looking at what normal looks like for the instance.

### Why does my EC2 CPU alarm only update every 5 minutes?

Basic monitoring publishes EC2 metrics every five minutes. Enable detailed monitoring for one-minute data, at extra cost.

### Why is my T3 instance slow but CPU only 20%?

It has probably run out of CPU credits and is being held at its baseline. Check CPUCreditBalance, or switch the instance to unlimited mode or a non-burstable type.

## When this happens away from your desk

CPU alarms are among the most common to arrive while you are away, and most can wait until morning. CloudConsole, a phone app for AWS, is built to show the CPU graph and the application's latency together on a phone so you can make that call.

[About the CloudConsole app](https://cloudconsole.dev/aws-console-app) · [Download on the App Store](https://apps.apple.com/app/cloudconsole-for-aws/id6835419710)

## Sources

- [Recommended alarms for AWS services (Amazon CloudWatch User Guide)](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Best_Practice_Recommended_Alarms_AWS_Services.html)
- [Enable or turn off detailed monitoring for your instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch-new.html)

## Related

- [How to create a CloudWatch alarm for CPU utilization](https://cloudconsole.dev/how-to/create-cloudwatch-cpu-alarm)
- [CloudWatch alarm: EC2 StatusCheckFailed](https://cloudconsole.dev/alarms/ec2-statuscheckfailed)
- [How to change an EC2 instance type](https://cloudconsole.dev/how-to/change-ec2-instance-type)
- [How to get CloudWatch alarm email notifications](https://cloudconsole.dev/how-to/cloudwatch-alarm-email-notification)
- [aws cloudwatch put-metric-alarm](https://cloudconsole.dev/cli/cloudwatch-put-metric-alarm)
- [How to connect to EC2 with Session Manager](https://cloudconsole.dev/how-to/connect-to-ec2-with-session-manager)

---

Source: https://cloudconsole.dev/alarms/ec2-cpuutilization

CloudConsole is an independent iPhone and Android app for Amazon Web Services by Cloudconcur Ltd. It is not affiliated with Amazon Web Services.
