Enabling Cost and Usage Reports

In March 2017, Amazon made improvements to the way that they apply RI hourly discounts. All Regional Linux/UNIX RIs with shared tenancy now apply to all sizes of instances within an instance family and AWS region, even if you are using them across multiple accounts via Consolidated Billing. This will further reduce the time that you spend managing your RIs and will let you be even more creative and innovative with your use of compute resources.

You can see more information about this change here: https://aws.amazon.com/blogs/aws/new-instance-size-flexibility-for-ec2-reserved-instances/

CloudCheckr has always used the AWS Detailed Billing Report (DBR) for cost and billing information. However, the addition of the Amazon Cost and Usage reports will give us enhanced insight into your deployment.

Specifically, enabling the Cost and Usage Reports will:

1. Allow CloudCheckr to pull Reserved Instance information from payees without the need for credentials.

2. Determine which instances were using which specific Reserved Instances. This is very useful for List Cost calculations and RI Unsharing.

If you have not yet enabled the Cost and Usage reports, you can follow this guide to establish those reports within your Amazon account(s).

To enable this report, please follow these steps:

1 – Login to the AWS Billing Console

You can access the Billing Console directly by logging into: https://console.aws.amazon.com/billing/home.

Alternatively, you can login to your main console, and in the top-right click on your account name, and in the dropdown select ‘My Billing Dashboard’.

2 – In the menu on the left-side, click Reports

CUR - Reports

3 – Click the blue Create report button.

CUR- Create Report

4 – Populate the Select Content form for the Cost and Usage Report

CUR - Select Content

NOTE: Be sure to select the following options for the reports to be compatible with CloudCheckr:

  • Time unit: Hourly
  • Include Resource IDs

The other settings are optional.

Click Next once you are happy with your selections.

5 – Populate the delivery options

CUR - Bucket Settings

To receive Cost and Usage Reports you have to choose which S3 bucket to store the report.  You must enter the name of an already-created S3 bucket. If your desired S3 bucket has not been created yet, go to the S3 Service in the AWS Console and create that bucket. Enter the exact name of the bucket within the “S3 Bucket” text box. You will also need to edit the S3 bucket properties and add a permission policy granting AWS access to publish your Reports.

Follow these steps to update the bucket policy:

  • Click “sample policy” beneath the bucket name where it reads, “Note: You must apply appropriate permissions to your S3 bucket. For quick access, copy and paste the text in this sample policy to your S3 bucket permissions which can be found on the S3 console.”
  • Copy that entire policy.
  • Next, click Services at the menu at the top of the page and select S3.
  • Locate the S3 bucket added to Cost and Usage report settings as the billing bucket and click it.  That will show you the list of options for that bucket.
  • Select the “Permissions” tab.
  • Click the “Bucket Policy” button.
  • Paste the sample policy that we copied from the billing permissions here.
  • Save your changes.

Once that’s done, go back to the Cost and Usage report settings, and click Verify on your bucket to validate that the proper policy was saved.  You will see a green checkbox, as shown below, once this is configured properly.

CUR - Bucket Saved

The other settings on the page are optional.  CloudCheckr supports both compression formats: GZIP and ZIP.

Once you are happy with your selections click the Next button.

6 – Review and Complete

Review the settings entered.  Be sure these two settings are entered:

|Hourly
Resource IDs
Click the Review and Complete button to save your report.
CUR - Success
That’s it! Your Cost and Usage report is created and will be available for CloudCheckr to utilize to properly calculate list cost.