Amazon Elastic Compute Cloud
User Guide (API Version 2014-02-01)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

Amazon EC2 Usage Reports

The usage reports provided by Amazon EC2 enable you to analyze the usage of your instances in depth. The data in the usage reports is updated multiple times each day. You can filter the reports by AWS account, region, Availability Zone, operating system, instance type, purchasing option, tenancy, and tags.

To get usage and cost data for an account, you must have its account credentials and enable detailed billing reports with resources and tags for the account. If you're using consolidated billing and are logged into the payer account, you can view data for the payer account and all its linked accounts. If you're using consolidated billing and are logged into one of the linked accounts, you can only view data for that linked account. For information about consolidated billing, see Pay Bills for Multiple Accounts with Consolidated Billing.

Available Reports

You can generate the following reports:

Getting Set Up for Usage Reports

Before you begin, enable detailed billing reports with resources and tags as shown in the following procedure. After you complete this procedure, we'll start collecting usage data for your instances. If you've already enabled detailed billing reports, you can access the usage data that we've been collecting since you enabled them.

Important

To complete these procedures, you must log in using your AWS account credentials. You can't complete these procedures if you log in using IAM user credentials.

To enable detailed billing reports

  1. Select an existing Amazon S3 bucket to receive your usage data. Be sure to manage access to this bucket as it contains your billing data. (We don't require that you keep these files; in fact, you can delete them immediately if you don't need them.) If you don't have a bucket, create one as follows:

    1. Open the Amazon S3 console.

    2. Click Create Bucket.

    3. In the Create a Bucket dialog box, enter a name for your bucket (for example, username-ec2-usage-data), select a region, and then click Create. For more information about the requirements for bucket names, see Creating a Bucket in the Amazon Simple Storage Service Console User Guide.

  2. Open the AWS Account Billing console at https://console.aws.amazon.com/billing/home?#.

  3. Click Preferences in the navigation pane.

  4. Select Receive Billing Reports.

  5. Specify the name of your Amazon S3 bucket in Save to S3 Bucket, and then click Verify.

  6. Grant AWS permission to publish usage data to your Amazon S3 bucket.

    1. Under Receive Billing Reports, click sample policy. Copy the sample policy. Notice that the sample policy uses the bucket name you specified.

    2. Open the Amazon S3 console in another browser tab. Select your bucket, click Properties, and then expand Permissions. In the Permissions section, click Add bucket policy. Paste the sample policy into the text area and click Save. In the Permissions section, click Save.

    3. Return to the browser tab with the sample policy and click Done.

  7. Under Report, select Detailed billing report with resources and tags.

  8. Click Save preferences.

    Note

    It can take up to a day before you can see your data in the reports.

You can categorize your instances using tags. After you tag your instances, you must enable reporting on these tags.

To enable usage reporting by tag

  1. Tag your instances. For best results, ensure that you add each tag you plan to use for reporting to each of your instances. For more information about how to tag an instance, see Tagging Your Amazon EC2 Resources.

  2. Open the AWS Account Billing console at https://console.aws.amazon.com/billing/home?#.

  3. Click Preferences in the navigation pane.

  4. Under Report, click Manage report tags.

  5. The page displays the list of tags that you've created. Select the tags that you'd like to use to filter or group your instance usage data, and then click Save. We automatically exclude any tags that you don't select from your instance usage report.

    Note

    We apply these changes only to the data for the current month. It can take up to a day for these changes to take effect.

Granting IAM Users Access to the Amazon EC2 Usage Reports

By default, IAM users can't access the Amazon EC2 usage reports. You must create an IAM policy that grants IAM users permission to access these reports.

The following policy allows users to view both Amazon EC2 usage reports.

{
  "Version": "2012-10-17",
  "Statement":[{
    "Effect": "Allow",
    "Action": "ec2-reports:*",
    "Resource": "*"
  }
  ]
}

The following policy allows users to view the instance usage report.

{
  "Version": "2012-10-17",
  "Statement":[{
    "Effect": "Allow",
    "Action": "ec2-reports:ViewInstanceUsageReport",
    "Resource": "*"
  }
  ]
}

The following policy allows users to view the Reserved Instances utilization report.

{
  "Version": "2012-10-17",
  "Statement":[{
    "Effect": "Allow",
    "Action": "ec2-reports:ViewReservedInstanceUtilizationReport",
    "Resource": "*"
  }
  ]
}

For more information, see Permissions and Policies in the Using IAM guide.