Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Aggregate statistics by AMI

Focus mode
Aggregate statistics by AMI - Amazon Elastic Compute Cloud

You can aggregate statistics by AMI for your instances that have detailed monitoring enabled. Instances that use basic monitoring are not included in the aggregates. Before you can get statistics aggregated across instances, you must enable detailed monitoring (at an additional charge), which provides data in 1-minute periods.

Note that Amazon CloudWatch cannot aggregate data across AWS Regions. Metrics are completely separate between Regions.

This example shows you how to determine average CPU utilization for all instances that use a specific Amazon Machine Image (AMI). The average is over 60-second time intervals for a one-day period.

To display the average CPU utilization by AMI (console)
  1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/.

  2. In the navigation pane, choose Metrics.

  3. Choose the EC2 namespace and then choose By Image (AMI) Id.

  4. Choose the row for the CPUUtilization metric and the specific AMI, which displays a graph for the metric for the specified AMI. To name the graph, choose the pencil icon. To change the time range, select one of the predefined values or choose custom.

  5. To change the statistic or the period for the metric, choose the Graphed metrics tab. Choose the column heading or an individual value, and then choose a different value.

To get the average CPU utilization for an image ID (AWS CLI)

Use the get-metric-statistics command as follows.

aws cloudwatch get-metric-statistics --namespace AWS/EC2 --metric-name CPUUtilization --period 3600 \ --statistics Average --dimensions Name=ImageId,Value=ami-3c47a355 --start-time 2022-10-10T00:00:00 --end-time 2022-10-11T00:00:00

The following is example output. Each value represents an average CPU utilization percentage for the EC2 instances running the specified AMI.

{ "Datapoints": [ { "Timestamp": "2022-10-10T07:00:00Z", "Average": 0.041000000000000009, "Unit": "Percent" }, { "Timestamp": "2022-10-10T14:00:00Z", "Average": 0.079579831932773085, "Unit": "Percent" }, { "Timestamp": "2022-10-10T06:00:00Z", "Average": 0.036000000000000011, "Unit": "Percent" }, ... ], "Label": "CPUUtilization" }
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.