AWS Amortized Cost and Actual savings for No Upfront Reservations
search cancel

AWS Amortized Cost and Actual savings for No Upfront Reservations

book

Article ID: 392131

calendar_today

Updated On: 04-04-2025

Products

CloudHealth

Issue/Introduction

The AWS Amortized Cost report does not provide cost for the No Upfront Reservation type 

Resolution

A Flexreport with the following custom query can be used to calculate amortized cost and Actual Savings.  Reference the sample query for EC2 instance below as a workaround:

++++++++++++

{
"sqlStatement" :
" SELECT
timeInterval_Month AS Month,
round(SUM(reservation_EffectiveCost), 2) as AmortizedCost,
round(
SUM(pricing_publicOnDemandCost) - SUM(reservation_EffectiveCost),
2
) as ActualSavings,
SPLIT_PART (reservation_ReservationARN, '/', 2) AS ReservationID,
bill_PayerAccountId AS Billing_Accounts,
lineItem_UsageAccountId as UsageAccounts,
product_operatingSystem AS Operating_System,
product_region AS Region,
product_tenancy AS Tenancy,
pricing_PurchaseOption AS Reservation_Type,
product_instanceType AS Instance_Types,
lineItem_AvailabilityZone AS Availability_Zone,
pricing_OfferingClass AS Reservation_Class,
organization.accountname AS Accounts
FROM
AWS_CUR
WHERE
(
(lineItem_LineItemType LIKE '%DiscountedUsage%')
OR (lineItem_LineItemType LIKE '%RIFee%')
)
AND (lineItem_ProductCode LIKE '%AmazonEC2%')
AND ((lineItem_UsageAmount) > 0)
AND (reservation_EffectiveCost) > 0
GROUP BY
timeInterval_Month,
bill_PayerAccountId,
product_operatingSystem,
product_region,
reservation_ModificationStatus,
pricing_PurchaseOption,
product_instanceType,
lineItem_AvailabilityZone,
pricing_OfferingClass,
organization.accountname,
product_tenancy,
reservation_ReservationARN,
lineItem_UsageAccountId
ORDER BY
Month desc ",

"needBackLinkingForTags" : true ,
"dataGranularity" : "MONTHLY" ,
"timeRange" : {
"last": 12,
"excludeCurrent": true
} ,
"limit" : -1
}

++++++++++