Amazon CloudWatch
User Guide

Get Statistics Aggregated by Auto Scaling Group

Aggregate statistics are available for instances that are within an Auto Scaling group. Amazon CloudWatch does not aggregate data across regions. Therefore, metrics are completely separate between regions.

This scenario shows you how to use the AWS Management Console, the get-metric-statistics command, or the GetMetricStatistics API with the DiskWriteBytes metric to retrieve the total bytes written to disk for one Auto Scaling group. The total is computed for one-minute periods for a 24-hour interval across all EC2 instances in the specified AutoScalingGroupName.


Start and end times must be within the last 14 days.

AWS Management Console

To display total DiskWriteBytes for an autoscaled EC2 application

  1. Open the CloudWatch console at

  2. If necessary, change the region. From the navigation bar, select the region that meets your needs. For more information, see Regions and Endpoints.

  3. In the navigation pane, click Metrics.

  4. In the CloudWatch Metrics by Category pane, under EC2 Metrics, select By Auto Scaling Group.

    The metrics available for Auto Scaling groups are displayed in the upper pane.

  5. Select the row that contains DiskWriteBytes.

    A graph showing DiskWriteBytes for all EC2 instances appears in the details pane.

    Metrics aggregated across an Auto Scaling group
  6. To change the Statistic, e.g., Average, for the metric, choose a different value from the pop-up list.

    Metrics aggregated by AMI
  7. To change the Period, e.g., 5 Minutes, to view data in more granular detail, choose a different value from the pop-up list.

Command Line Tools

To get total DiskWriteBytes for an autoscaled EC2 application

  • Enter the get-metric-statistics command with the following parameters.

    Prompt>aws cloudwatch get-metric-statistics --metric-name DiskWriteBytes --start-time 2014-02-16T23:18:00 --end-time 2014-02-18T23:18:00 --period 360 --namespace AWS/EC2 --statistics "Sum" "SampleCount" --dimensions Name=AutoScalingGroupName,Value=test-group-1

    The AWS CLI returns the following:

        "Datapoints": [
                "SampleCount": 18.0, 
                "Timestamp": "2014-02-19T21:36:00Z", 
                "Sum": 0.0, 
                "Unit": "Bytes"
                "SampleCount": 5.0, 
                "Timestamp": "2014-02-19T21:42:00Z", 
                "Sum": 0.0, 
                "Unit": "Bytes"
        "Label": "DiskWriteBytes"

Query API

To get total DiskWriteBytes for an autoscaled EC2 application

  • Call GetMetricStatistics with the following parameters:

    • MetricName = DiskWriteBytes

    • Period = 60

    • Statistics list includes Sum

    • Unit = Bytes

    • Dimensions (Name=AutoScalingGroupName, Value=test-group-1)

    • Namespace = AWS/EC2

    • StartTime = 2011-01-10T23:18:00

    • EndTime = 2011-01-11T23:18:00

    The statistics returned are one-minute totals for bytes written for the entire Auto Scaling group over the 24-hour interval.