EC2 Cost History returns Cost under On-Demand when all instances are covered by RI or SP
search cancel

EC2 Cost History returns Cost under On-Demand when all instances are covered by RI or SP

book

Article ID: 394564

calendar_today

Updated On:

Products

CloudHealth

Issue/Introduction

You may find when using the "Instance Cost" measure in the EC2 Cost report that you have charges appear under the On-Demand category. 


Resolution

This is due to the Instance Cost measure including more than just compute charges, these charges as they don't relate to compute cannot be covered by an RI or SP so they will appear under On-Demand

To confirm this please create a FlexReport using the following query below, this will break down the Cost of EC2 into it's separate components, you will likely find that the charges relate to Data Transfer costs and should be able to align the cost against that record in the FlexReport with the cost displayed under On-Demand. 

{
  "sqlStatement": "SELECT timeInterval_Month AS Month, lineItem_ProductCode AS LineItem_ProductCode, SUM(lineItem_NetUnblendedCost) AS SUM_lineItem_NetUnblendedCost, product_productFamily AS Product_productFamily FROM AWS_CUR WHERE (lineItem_ProductCode IN ('AmazonEC2')) GROUP BY timeInterval_Month, lineItem_ProductCode, product_productFamily",
  "needBackLinkingForTags": true,
  "dataGranularity": "MONTHLY",
  "timeRange": {
    "from": "2025-03",
    "to": "2025-03"
  },
  "limit": -1
}