Calculating NetAmortisedCost via Cost and Usage Report



Unable to calculate netamortisedcost from Cost and Usage Report (CUR) data But AWS Cost Explorer still shows it.


we ingest Cost and Usage Reports (CSV files) internally into our BI system for cost management and also do few other things on top of it.

We know that there are some columns in CUR which only comes when there is any savings plan or RIs applied for the corresponding aws account(s). If there are no savings plan / RIs applied, then AWS Cost explorer also should not show the netamortised cost calculation. Since it does, we want to understand how we can do the same using the data in cost and usage report.

We use below SQL query to generate the netamortised cost. This has been working fine for us for some months. But for some other months this returns 0 netamortisedcost while AWS Cost explorer shows this metric.

This query is for netamortisedcost calculation but is ported from for amortised cost calculation.

  WHEN (lineitemtype = 'SavingsPlanNegation') THEN 0
  WHEN (lineitemtype = 'SavingsPlanUpfrontFee') THEN 0 
  WHEN (lineitemtype = 'SavingsPlanCoveredUsage') THEN NetSavingsPlanEffectiveCost 
  WHEN (lineitemtype = 'SavingsPlanRecurringFee') THEN (TotalCommitmentToDate - UsedCommitment) 
  WHEN (lineitemtype = 'DiscountedUsage') THEN NetEffectiveCost 
  WHEN (lineitemtype = 'RIFee') THEN (NetUnusedAmortizedUpfrontFeeForBillingPeriod + NetUnusedRecurringFee) 
  WHEN ((lineitemtype = 'Fee') AND (ReservationARN <> '')) THEN 0 
  ELSE NetUnblendedCost 
END netAmortisedCost

How AWS Cost Explorer is showing this cost metric even when there is no SP/RIs applied.

asked a year ago302 views
1 Answer

AWS Cost Explorer can show cost metrics even when there are no Savings Plans (SP) or Reserved Instances (RIs) applied to your AWS resources. The Cost Explorer retrieves cost data directly from your AWS billing data and provides various metrics and visualizations to help you analyze your costs.

Here are a few reasons why you may see cost metrics in AWS Cost Explorer without any SP/RIs applied:

  1. On-Demand Instances: The majority of your AWS resource usage might be billed at on-demand rates. On-demand instances are the default pricing model, and their costs will be shown in Cost Explorer irrespective of any applied SP/RIs.

  2. Other AWS Services: AWS Cost Explorer provides cost analysis for various AWS services, including EC2, S3, RDS, Lambda, and more. Even if you don't have SP/RIs for EC2 instances, you can still see costs associated with other services.

  3. Non-Applicable SP/RIs: If you have purchased SP/RIs for specific instance families, regions, or platforms, but your usage does not match the criteria covered by those SP/RIs, the costs will not be associated with the purchased SP/RIs. In such cases, the costs will still be visible in Cost Explorer without the SP/RI discounts.

  4. Partial Coverage: If you have a mix of on-demand and SP/RI usage, the Cost Explorer will show the costs for both. The SP/RI discounts will be applied only to the corresponding eligible usage, while the remaining costs will be shown separately.

In summary, AWS Cost Explorer provides a comprehensive view of your AWS costs, including both on-demand and SP/RI usage. Even if you don't have SP/RIs applied, you can still see the costs associated with your resource usage.

answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions