AWS Cost History Discrepancies with FlexReports, Statements, or Cost Explorer
search cancel

AWS Cost History Discrepancies with FlexReports, Statements, or Cost Explorer

book

Article ID: 282781

calendar_today

Updated On:

Products

CloudHealth

Issue/Introduction

There may be some occurrences where totals in Cost History do not match Flex Reports or AWS Cost Explorer despite no obvious issues. 

Resolution

The difference can be due to how Cost History is grouped by 'UsageStartDate' and FlexReports looks at 'BillingPeriodStartDate'. Some service costs like "OCBAWS reInvent Passes", "Amazon Registrar", and "CapacityBlockFee" fall into different months. These services are billed in a certain month, but their usage is in a future month. 

Examples for "OCBAWS reInvent Passes": 

1)  If a customer was billed for this service in October 2025 than Statements/FlexReports will show the charge in October 2025, since this is when the customer was billed for the service (e.g.'BillingPeriodStartDate). 

     However, Cost History will show the "OCBAWS reInvent Passes" cost in December 2025, because that is the month when the usage started (e.g. UsageStartDate). 

         To confirm the UsageStartDate:

    • Download the Statement CSV for the month in question here: https://apps.cloudhealthtech.com/reports/aws/system/statements  
    • Filter the statement by UsageStartDate column to where the data is not in current month.
    • Filter the RecordType column to only Payer or Linked account and the total cost should equal the difference you observed between Statement/FlexReport and Cost History. 
    • It is also possible to ZERO out this charge if needed by using a Custom Price Book (CPB) like below. Keep in mind that the RuleGroup startDate should be on or before the UsageStartDate or BillingPeriodStartDate, whichever comes first.   
      • CPB RuleGroup for the example above:

                               <RuleGroup startDate="2025-10-01" endDate="2025-12-31">  OR  <RuleGroup startDate="2025-10-01"> (no endDate)
                                      <BillingRule name="Zero out all reInvent Pass lineitems" includeDataTransfer="true">
                                             <BasicBillingRule billingAdjustment="0.0" billingRuleType="fixedRate"/>
                                             <Product productName="OCBAWS reInvent Passes">
                                                   <UsageType name="USE1-OCB-OCBreInvent-Units"/>
                                             </Product>
                                     </BillingRule>
                               </RuleGroup>     

2)  Another way to confirm this is if we observe OCBLate charges in FlexReports and calculate if the OCBLate fee is causing the discrepancy between FlexReports and the Cost History report. Take the example below: 

    Total Cost Showing in Cost History report for 07-2025 through 09-2025

   

    

    Total Cost Showing in FlexReports for 07-2025 through 09-2025

  •    

     

     FlexReport query showing OCBLateFee charged for 07-2025 through 10-2025

  • {
      "sqlStatement": "SELECT timeInterval_Month AS Month, SUM(lineItem_UnblendedCost) AS SUM_lineItem_UnblendedCost, bill_PayerAccountId AS Bill_PayerAccountId, bill_BillingEntity AS Bill_BillingEntity, lineItem_LineItemType AS LineItem_LineItemType, product_ProductName AS Product_ProductName FROM AWS_CUR WHERE (bill_BillingEntity NOT IN ('AWS Marketplace')) AND (bill_PayerAccountId IN ('INSERT PayerAccountId')) AND (lineItem_LineItemType NOT IN ('Tax')) AND (product_ProductName LIKE '%OCB%') GROUP BY timeInterval_Month, bill_PayerAccountId, bill_BillingEntity, lineItem_LineItemType, product_ProductName ORDER BY Month ASC",
      "needBackLinkingForTags": true,
      "dataGranularity": "MONTHLY",
      "timeRange": {
        "from": "2025-07",
        "to": "2025-10"
      },
      "limit": -1
    }

     

     Table calculations to show how OCBLateFee is causing the cost discrepancy between FlexReports and the Cost History report for 07-2025 through 09-2025

  •