How is Fargate OnDemand and Savings Plan Usage represented in CloudHealth?
search cancel

How is Fargate OnDemand and Savings Plan Usage represented in CloudHealth?

book

Article ID: 283970

calendar_today

Updated On: 06-08-2022

Products

CloudHealth

Issue/Introduction

What are the Fargate usages covered under Savings Plan?

Savings Plan for the Fargate can cover both Fargate Compute and Memory but not the Data transfer.
https://aws.amazon.com/savingsplans/compute-pricing/ 

mceclip0.png

What types of usages are reported for the Fargate usage under CH Cost History report?

The Cost History reports all types of usage for the Fargate service which is covered under OnDemand, Spot and SP.

 

Can we see which part of Fargate usage is OnDemand and which part is covered by Savings Plan Under the FlexReport?

Definitely, Please use the below FlexReport Query:

{
"sqlStatement": "SELECT timeInterval_Day AS Day, SUM(lineItem_UnblendedCost) AS SUM_lineItem_UnblendedCost, SUM(lineItem_UsageAmount) AS SUM_lineItem_UsageAmount, SUM(savingsPlan_SavingsPlanEffectiveCost) AS SUM_savingsPlan_SavingsPlanEffectiveCost, lineItem_UsageType AS LineItem_UsageType, lineItem_LineItemDescription AS LineItem_LineItemDescription, savingsPlan_SavingsPlanARN AS SavingsPlan_SavingsPlanARN, lineItem_LineItemType AS LineItem_LineItemType, lineItem_UsageAccountId AS LineItem_UsageAccountId FROM AWS_CUR WHERE ((lineItem_UsageType LIKE '%Fargate-GB%') OR (lineItem_UsageType LIKE '%Fargate-vCPU%')) GROUP BY timeInterval_Day, lineItem_UsageType, lineItem_LineItemDescription, savingsPlan_SavingsPlanARN, lineItem_LineItemType, lineItem_UsageAccountId ORDER BY \"SUM(savingsPlan_SavingsPlanEffectiveCost)\" DESC",
"needBackLinkingForTags": true,
"dataGranularity": "DAILY",
"timeRange": {
"last": 7
},
"limit": -1
}

LineItemType = UsageType : refers to both OnDemand and Spot Usage, and the total cost should be taken from the UnblendedCost column.
LineItemType = SavingsPlanNegation : refers to the SavingsPlan credits to zered the UnblendedCost (OnDemand).
LineItemType = SavingsPlanCoveredUsage: refers to SavingsPlan effective cost aginst the OnDemand cost. The total cost should be taken from the column SavingsPlanEffectiveCost.

To summarize, the UnblendedCost will have the cost of both OnDemand and Spot usage. The SavingsPlanEffectiveCost column will have the SP applied cost and subsequent OnDemand cost will be zeroed with the SavingsPlanNegation line item type.