| Did this page help you? Yes No Tell us about it... |
Amazon CloudWatch is a service that collects raw data from partnered AWS products such as Amazon EC2 and then processes the information into readable, near real-time metrics. These statistics are recorded for a period of two weeks, allowing you access to historical information and providing you with a better perspective on how your web application or service is performing. For detailed information about Amazon CloudWatch, go to the Amazon CloudWatch Developer Guide.
The following table describes the types of Amazon EC2 monitoring data available to you.
| Resource | Type | Description |
|---|---|---|
|
Instances |
Basic |
Data is available automatically in 5-minute periods at no charge. |
|
Detailed |
Data is available in 1-minute periods at an additional cost. To get this level of data, you must specifically enable it for the instance. For the instances where you've enabled detailed monitoring, you can also get aggregated data across groups of similar instances. For information about pricing, go to the Amazon CloudWatch product page. | |
|
Volumes |
Basic |
Data is available automatically in 5-minute periods at no charge. No detailed data is available for Amazon EBS volumes. |
You can get monitoring data for your Amazon EC2 instances using either the Amazon CloudWatch API or the AWS Management Console. The console displays a series of graphs based on the raw data from the Amazon CloudWatch API. Depending on your needs, you might prefer to use either the data from the API or the graphs in the console.
You can use the Amazon CloudWatch GetMetricStatistics API to get any of the
instance metrics listed in the following table. The period refers to how often the
system reports a data point for each metric for an instance. If you've enabled detailed monitoring, each
data point covers the instance's previous 1 minute of activity. Otherwise, each data point covers the
instance's previous 5 minutes of activity.
| Metric | Description |
|---|---|
|
The percentage of allocated EC2 compute units that are currently in use on the instance. This metric identifies the processing power required to run an application upon a selected instance. Units: Percent |
|
Completed read operations from all ephemeral disks available to the instance (if your instance uses Amazon EBS, see Amazon EBS Metrics.) This metric identifies the rate at which an application reads a disk. This can be used to determine the speed in which an application reads data from a hard disk. Units: Count |
|
Completed write operations to all ephemeral disks available to the instance (if your instance uses Amazon EBS, see Amazon EBS Metrics.) This metric identifies the rate at which an application writes to a hard disk. This can be used to determine the speed in which an application saves data to a hard disk. Units: Count |
|
Bytes read from all ephemeral disks available to the instance (if your instance uses Amazon EBS, see Amazon EBS Metrics.) This metric is used to determine the volume of the data the application reads from the hard disk of the instance. This can be used to determine the speed of the application. Units: Bytes |
|
Bytes written to all ephemeral disks available to the instance (if your instance uses Amazon EBS, see Amazon EBS Metrics.) This metric is used to determine the volume of the data the application writes onto the hard disk of the instance. This can be used to determine the speed of the application. Units: Bytes |
|
The number of bytes received on all network interfaces by the instance. This metric identifies the volume of incoming network traffic to an application on a single instance. Units: Bytes |
|
The number of bytes sent out on all network interfaces by the instance. This metric identifies the volume of outgoing network traffic to an application on a single instance. Units: Bytes |
![]() | Note |
|---|---|
When you get data from the Amazon CloudWatch system, you can specify a
|
You can use the dimensions in the following table to refine the metrics returned for your instances.
|
Dimension |
Description |
|---|---|
AutoScalingGroupName
|
This dimension filters the data you request for all instances in a specified capacity group. An AutoScalingGroup is a collection of instances you define if you're using the Auto Scaling service. This dimension is available only for EC2 metrics when the instances are in such an AutoScalingGroup. Available for instances with Detailed or Basic Monitoring enabled. |
ImageId
|
This dimension filters the data you request for all instances running this EC2 Amazon Machine Image (AMI). Available for instances with Detailed Monitoring enabled. |
InstanceId
|
This dimension filters the data you request for the identified instance only. This helps you pinpoint an exact instance from which to monitor data. Available for instances with Detailed Monitoring enabled. |
InstanceType
|
This dimension filters the data you request for all instances running with this specified instance type. This helps you categorize your data by the type of instance running. For example, you might compare data from an m1.small instance and an m1.large instance to determine which has the better business value for your application. Available for instances with Detailed Monitoring enabled. |
For more information about using the GetMetricStatistics action, go to GetMetricStatistics in the Amazon CloudWatch API Reference.
After you launch an instance, you can go to the AWS Management Console and view the instance's monitoring graphs. They're displayed when you select the instance on the Instances page in the EC2 Dashboard. A Monitoring tab is displayed next to the instance's Description tab. The following graphs are available:
Average CPU Utilization (Percent)
Average Disk Reads (Bytes)
Average Disk Writes (Bytes)
Maximum Network In (Bytes)
Maximum Network Out (Bytes)
The AWS Management Console contains a console for Amazon CloudWatch. In the Amazon CloudWatch console you can search and browse all your AWS resource metrics, view graphs to troubleshoot issues and discover trends, create and edit alarms to be notified of problems, and see at-a-glance overviews of your alarms and AWS resources. For more information, go to AWS Management Console in the Amazon CloudWatch Developer Guide.
This section describes how to enable detailed monitoring on either a new instance (as you launch it) or on a running or stopped instance. After you enable detailed monitoring, the Amazon EC2 console in the AWS Management Console displays monitoring graphs with a 1-minute period for the instance.
To enable detailed monitoring when launching an instance
When launching an instance with the AWS Management Console, select the check box for Enable detailed CloudWatch Monitoring for this instance on the Advanced Instance Options section of the Classic launch wizard.
After the instance is launched, you can select the instance in the console and view its monitoring graphs on the instance's Monitoring tab in the lower pane.
For information about launching instances, see Launching and Using Instances.
To enable detailed monitoring on an existing instance
In your list of instances in the AWS Management Console, right-click the instance and click Enable Detailed Monitoring. The instance can be either running or stopped.
Detailed data (collected with a 1-minute period) is then available for the instance in the AWS Management Console graphs or through the API.
To enable detailed monitoring when launching an instance
Use the ec2-run-instances command with the --monitor
flag.
PROMPT>ec2-run-instances ami-2bb65342 -k gsg-keypair --monitor
Amazon EC2 returns output similar to the following example. The status of monitoring is listed as monitoring-enabled.
RESERVATION r-7430c31d 111122223333 default
INSTANCE i-ae0bf0c7 ami-2bb65342 pending gsg-keypair 0 m1.small 2008-03-21T16:19:25+0000 us-east-1a monitoring-enabled After the instance is running, detailed data (collected with a 1-minute period) is then available for the instance in the AWS Management Console graphs or through the API.
To enable detailed monitoring on an existing instance
Use the ec2-monitor-instances command with one or more instance
IDs.
PROMPT>ec2-monitor-instances i-1a2b3c4di-1a2b3c4d monitoring-pending
Detailed data (collected with a 1-minute period) is then available for the instance in the AWS Management Console graphs or through the API.
You can create an Amazon CloudWatch alarm that monitors any one of your Amazon EC2 instance’s CloudWatch metrics. CloudWatch will automatically send you a notification when the metric reaches a threshold you specify. You can create a CloudWatch alarm on the Amazon EC2 console of the AWS Management Console, or you can use the CloudWatch console and configure more advanced options.
To create a CloudWatch alarm for high CPU
On the Amazon EC2 console, select the instance for which you want to create an alarm.
On the instance’s Monitoring tab in the lower pane, click Create Alarm.
In the Create Alarm dialog box, set the criteria for your alarm. In this example, we’ll set an alarm if the instance’s average CPU utilization is above 70 percent.
The check box next to Send a notification is selected by default. Click Create topic, and either use the default name, or select an existing name. (Notifications use Amazon Simple Notification Service (Amazon SNS)).
In the With these recipients box, enter the email addresses of the recipients you want to notify. You can enter up to 10 email addresses, each separated by a comma.
Configure the threshold for your alarm.
In the Whenever boxes, select Average and CPU Utilization.
In the Is boxes, define the threshold for the alarm by selecting > and entering 70.
In the For at least boxes, specify the sampling period and number of samples evaluated by the alarm. You can leave the defaults or define your own. For our example, we’ll monitor for 1 period of 15 minutes.
![]() | Note |
|---|---|
A shorter period creates a more sensitive alarm. A longer period can mitigate brief spikes in a metric. |
In Alarm name, a name is automatically generated for you. Click Edit if you want to change the name.
![]() | Important |
|---|---|
You cannot modify the name after you create the alarm. |

Click Create Alarm.
After you create the alarm, you can use the Monitoring tab in the Amazon EC2 console to view a summary of alarms that have been set for that instance. From there, you can also edit the alarm.
![]() | Note |
|---|---|
If you created a new Amazon SNS topic for this alarm or added new email addresses to an existing topic, each email address added will receive a subscription confirmation email from Amazon SNS. The person who receives the email must confirm it by clicking the included link in order to receive notifications. |
The following table describes the types of monitoring data available for your Amazon EBS volumes.
| Type | Description |
|---|---|
|
Basic |
Data is available automatically in 5-minute periods at no charge. This includes data for the root device volumes for Amazon EBS-backed instances. No detailed data is available for Amazon EBS volumes. |
![]() | Note |
|---|---|
When you get data from Amazon CloudWatch, you can specify a
|
You can get the data using either the Amazon CloudWatch API or the AWS Management Console. The console takes the raw data from the Amazon CloudWatch API and displays a series of graphs based on the data. Depending on your needs, you might prefer to use either the data from the API or the graphs in the console.
You can use the Amazon CloudWatch GetMetricStatistics API to get any of the
Amazon EBS volume metrics listed in the following table. The period for all the metrics is 5 minutes,
which means the system reports one data point every 5 minutes for each metric for each volume, and that
data point covers the volume's previous 5 minutes of activity.
The following table groups metrics that are similar. The metrics in the first two rows are also available for the local stores on Amazon EC2 instances.
| Metric | Description |
|---|---|
|
|
The total number of bytes transferred in the period. Units: Bytes |
|
|
The total number of operations in the period. Units: Count |
|
|
The total number of seconds spent by all operations that completed in the period. If multiple requests are submitted at the same time, this total could be greater than the length of the period. For example, say the period is 5 minutes (300 seconds); if 700 operations completed during that period, and each operation took 1 second, the value would be 700 seconds. Units: Seconds |
|
|
The total number of seconds in the period when no read or write operations were submitted. Units: Seconds |
|
|
The number of read and write operation requests waiting to be completed in the period. Units: Count |
Once you create a volume, you can go to the Amazon EC2 console and view the volume's monitoring graphs. They're displayed when you select the volume on the Volumes page in the EC2 console. A Monitoring tab is displayed next to the volume's Description tab. The following table lists the graphs that are displayed. The column on the right describes how the raw data metrics from the Amazon CloudWatch API are used to produce each graph. The period for all the graphs is 5 minutes.
| Graph Name | Description Using Raw Metrics |
|---|---|
|
Read Bandwidth (KiB/s) |
Sum(VolumeReadBytes) / Period / 1024 |
|
Write Bandwidth (KiB/s) |
Sum(VolumeWriteBytes) / Period / 1024 |
|
Read Throughput (Ops/s) |
Sum(VolumeReadOps) / Period |
|
Write Throughput (Ops/s) |
Sum(VolumeWriteOps) / Period |
|
Avg Queue Length (ops) |
Avg(VolumeQueueLength) |
|
% Time Spent Idle |
Sum(VolumeIdleTime) / Period * 100 |
|
Avg Read Size (KiB/op) |
Avg(VolumeReadBytes) / 1024 |
|
Avg Write Size (KiB/op) |
Avg(VolumeWriteBytes) / 1024 |
|
Avg Read Latency (ms/op) |
Avg(VolumeTotalReadTime) * 1000 |
|
Avg Write Latency (ms/op) |
Avg(VolumeTotalWriteTime) * 1000 |
For the average latency graphs and average size graphs, the average is calculated over the total number of operations (read or write, whichever is applicable to the graph) that completed during the period.
The AWS Management Console contains a console for Amazon CloudWatch. In the Amazon CloudWatch console you can search and browse all your AWS resource metrics, view graphs to troubleshoot issues and discover trends, create and edit alarms to be notified of problems, and see at-a-glance overviews of your alarms and AWS resources. For more information, go to AWS Management Console in the Amazon CloudWatch Developer Guide.