Introduction
Amazon Web Services (AWS) uses a pay-as-you-go model in which the user is billed only for what they use. The daily usage status and billing amount can be checked using the cost management tools provided by AWS or other third-party tools. However, to obtain the exact amount spent by any certain condition or multiple conditions, e.g. the amount spent for a specific department or project within a certain period, or by instance type, you need to refer to much more detailed usage data. The detailed usage data can be obtained via API or the AWS Cost and Usage Report (commonly known as CUR) which is explained in this article.
What is CUR?
The "most comprehensive set of cost and usage data available," as described by AWS. The CUR contains a large amount of detailed and vast data about AWS costs. The CUR will be created by setting from the AWS console. You can access the settings page from the “Get started” link o AWS's CUR introduction page.
The CUR file is large because it aggregates/contains a lot of information. Hence, it is not efficient to download and utilize the CSV file as is. The standard method is to deliver the CUR file to an Amazon Simple Storage Service (Amazon S3) bucket before processing the data.
Features/Characteristics
- 1. Data for all the member accounts under the organization retrieved once set in the payer account
- 2. Can be set for each member account
- 3. Hourly or daily data available
- 4. Amounts stated in US Dollars
- 5. A CSV file delivered per month
Information that can be Obtained from the CUR
The CUR contains more than 300 items, with new items being added and specification changed from time to time. The table below lists the main items that are considered to be effective for data utilization.
*For further explanation of the AWS document, refer to Line item details.
Applying CUR to Actual Scenarios
You will be able to retrieve the data you want by extracting or multiplying specific items in the CUR according to the conditions. Here are some examples.
1. Calculate the on-demand usage fee for a specific account.
- a. Specify the account ID with lineitem_usageaccountid
- b. Specify Usage with lineitem_lineitemtype
- c. Sum up the amount of lineitem_unblendedcost that meets the conditions of a and b
2. Calculate the EC2 on-demand usage fee for a specific account.
- a. Specify the account ID with lineitem_usageaccountid
- b. Specify Usage with lineitem_lineitemtype
- c. Specify Amazon EC2 with lineitem_productcode
- d. Sum up the amount of lineitem_unblendedcost that meets the conditions of a, b, and c
3. Calculate usage for a particular instance.
- a. Specify the Instance ID with lineitem_resourceid
- b. Sum up the amount of lineitem_usageamount that meets the condition of a
Summary
Understanding the accurate costs on cloud is the first and necessary step for “unboxing” the complicated spend for cloud computing from the black box and optimizing your investment in cloud. The CUR helps you identify accurate and detailed cost and usage data at any level of granularity or in any groups. Using it in combination with native cloud vendor tools or third-party tools will help you understand cloud costs more efficiently.