How do I migrate from a detailed billing report to the AWS Cost and Usage report?

Last updated: 2020-04-27

I want to use the AWS Cost and Usage report to help me understand my billing. How do I migrate from the detailed billing report to the AWS Cost and Usage report?

Resolution

The AWS Cost and Usage Report is a comprehensive source for AWS cost and usage data. For a full list of the columns in the AWS Cost and Usage Report, see Data Dictionary.

The AWS Cost and Usage Report contains much of the data that detailed billing reports (DBR) do. In addition, the AWS Cost and Usage Report includes the following:

  • Reserved Instances (RI) cost and usage
  • RI regional size flexibility
  • Amortized RI cost
  • Normalized RI units
  • AWS service product metadata

If you're migrating to AWS Cost and Usage Report from DBR, align the column mapping between the two reports:

Field name in the detailed billing report Field name in the AWS Cost and Usage Report
InvoiceId bill/InvoiceId
PayerAccountId bill/PayerAccountId
LinkedAccountId lineItem/UsageAccountId
ProductName product/ProductName
SubscriptionId reservation/reservationARN
UsageType lineItem/UsageType
Operation lineItem/Operation
AvailabilityZone lineItem/AvailabilityZone
ReservedInstance pricing/PurchaseOption
ItemDescription lineItem/LineItemDescription
UsageStartDate lineItem/UsageStartDate
UsageEndDate lineItem/UsageEndDate
UsageQuantity lineItem/UsageAmount
BlendedRate lineItem/BlendedRate
BlendedCost lineItem/BlendedCost
UnBlendedRate lineItem/UnblendedRate
UnBlendedCost lineItem/UnblendedCost
ResourceId lineItem/ResourceId

In some cases, you must filter cost data differently in the AWS Cost and Usage Report than you do in DBR. Here are some examples:

Cost data type Finding it in DBR Finding it in the AWS Cost and Usage Report
Taxes Parsing the ItemDescription column for "Tax" Filtering on "lineItem / lineItemType" = "Tax"
RI discounts Filtering on "ReservedInstance" = Y Filtering on "lineItem / lineItemType" = "DiscountedUsage"
RI subscription costs (upfront costs) Not available Filtering on "lineItem / lineItemType" = "Fee"
RI recurring costs (monthly fees) Not available Filtering on "lineItem / lineItemType" = "RIFee"
Refunds Parsing the ItemDescription column for "Refund" Filtering on "lineItem / lineItemType" = "Refund"
Credits Parsing the ItemDescription column for "Credit" Filtering on "lineItem / lineItemType" = "Credits"

Some columns from DBR are not directly available in the AWS Cost and Usage Report, but you can find the data with a query. Here are some examples:

Note: Replace REPORT in the following queries with the name of your AWS Cost and Usage Report file.

LineItem

lineitem_lineitemtype = Usage

InvoiceTotal

Select 
sum(lineitem_unblendedcost)
from 
REPORT
group by bill_invoiceid

AccountTotal

Select 
sum(lineitem_unblendedcost)
from 
REPORT
group by lineitem_usageaccountid

StatementTotal

Select 
sum(lineitem_unblendedcost)
from 
REPORT

Discount

lineitem_lineitemtype = Discount

Note: The DBR fields RecordType, RecordId, RateId, Discount, and PricingPlanId are not available in the AWS Cost and Usage Report.

The AWS Cost and Usage Report contains comprehensive cost data and might include thousands of lines. It's a best practice to use one or more of the following solutions to analyze large reports efficiently:


Did this article help you?

Anything we could improve?


Need more help?