Discrepancies often appear when comparing the CloudHealth Cost History report with CUR-based reports such as FlexReports.
Total costs for a specific AWS account do not match between Cost History and FlexReports.
Daily cost totals show a consistent percentage variance.
The overall monthly total aligns per payer account, but daily intervals differ between individual accounts.
These variations are typically due to differences in how recurring costs and Savings Plans are allocated in Cost History report.
The Cost History report utilizes apportioning logic which reflects Effective Costs, which spreads monthly recurring fees across daily usage line items whereas FlexReports reflects Unblended Cost and requires you to add columns to show amortized components of Savings Plans.
To reconcile the totals, ensure the FlexReport query includes all amortized and fee-based components:
In FlexReports add the following columns to the report:
- daily interval filtered to day/s in question
- lineItem/UnblendedCost
- savingsPlan/SavingsPlanEffectiveCost
- reservation/ReservationEffectiveCost
Sum these fields in FlexReport to match the total per day reflected in the Cost History report.
Example query:
{
"sqlStatement": "SELECT timeInterval_Day AS Day, SUM(savingsPlan_SavingsPlanEffectiveCost) AS SUM_savingsPlan_SavingsPlanEffectiveCost, SUM(lineItem_UnblendedCost) AS SUM_lineItem_UnblendedCost, SUM(reservation_EffectiveCost) AS SUM_reservation_EffectiveCost FROM AWS_CUR GROUP BY timeInterval_Day ORDER BY SUM_lineItem_UnblendedCost DESC",
"needBackLinkingForTags": true,
"dataGranularity": "DAILY",
"timeRange": {
"last": 30
},
"limit": -1
}