In this article, we are going to set up AWS Cost and Usage reports. AWS Cost and Usage Reports track your AWS usage and provide estimated charges associated with your account. The AWS Cost and usage report contain the most encyclopedic set of cost and usage data available. You can use cost and usage reports to get your AWS billing data in the form of reports. You can receive reports that break down your cost by the hour or month, by a product or a product resource, or by the tax that you define yourself.
There are three basic benefits of setting up cost and usage reports as listed below:
- You can deliver report files to your Amazon S3 bucket.
- You can also update the report up to three times a day.
- Creating, retrieving, and deleting your reports can be done using the AWS cost and usage reports API reference.
Note that cost and usage reports can be set up by a standalone account. If you use the consolidated billing feature in AWS organizations, then the billing reports can only be owned by the payer account in your organization. Member accounts cannot receive billing reports. If you use consolidated billing you can also have your cost broken down by member account.
Let’s look into how we can achieve the same. To do so follow the below steps:
Step 1: First sign into the AWS Management Console and then navigate to the Billing and Cost Management console.
Step 2: Select “Cost and Usage reports”. It’s the fifth option on the left.
Step 3: Choose “Create report”.
Step 4: Choose a unique name for every report. The name should be alphanumeric without any spaces. To receive more information on your billing report select “Include resource IDs” to include the IDs of each resource in the report. For “Data refresh settings” gives you an option to choose whether you want the AWS CUR to refresh if AWS applies any kind of refunds, provides credits, or additional support fees to your account after the final bill is generated. When a report refreshes a new report is uploaded to the Amazon S3 bucket. Then choose the next button.
Step 5: For the S3 bucket choose “configure”.
Step 6: In the configure S3 bucket dialog box do one of the following:
- Choose a bucket from the existing list of buckets from the drop-down list and choose next.
- Enter a bucket name and the region where you want to create a new bucket and then choose next.
Step 7: Then select the “I have confirmed that this policy is correct” box and choose to save.
Step 8: For “Report part prefix” enter the report part prefix that you want to be pretended to the name of your report. This step is optional for Amazon Redshift or Amazon Quicksite but required for Amazon Athena. If you don’t specify a prefix then the default prefix is the name that you specified for the report in step 4.
Step 9: Enter the date range for the report in the following format:
Step 10: For “Time granularity” you can opt for any of the following depending upon your use case:
- Hourly: If you want the line items in the report to be aggregated by the hour.
- Daily: If you want the line items in the report to be aggregated by the day.
- Monthly: If you want the line items in the report to be aggregated by month.
Step 10: For “Report versioning” choose whether you want each version of the report to override the previous version of the report or to be delivered in addition to the previous versions.
Step 11: For “Enable report data integration” select whether you want to upload your cost and usage reports to Amazon Athena, Amazon Redshift or Amazon Quicksight.The report is compressed in the following formats:
- For Amazon Athena Park compression
- For Amazon Redshift or Amazon Quicksite, the .GZIP compression.
Step 12: Choose next after you review the settings for your report. Choose review and complete.
Share your thoughts in the comments
Please Login to comment...