Flexreport to find Compute Cost Before RIs/SPs for EC2 Instance
search cancel

Flexreport to find Compute Cost Before RIs/SPs for EC2 Instance

book

Article ID: 427533

calendar_today

Updated On:

Products

CloudHealth

Issue/Introduction

You can utilize below FlexReport query  to retrieve Compute Cost Before RIs/SPs for EC2 Instance

Resolution

This report is designed using the "AWS_CUR" dataset to find the Compute Cost Before RIs/SPs for EC2 Instance:
{
  "sqlStatement": "SELECT timeInterval_Month AS timeInterval_Month, SUM(lineItem_UnblendedCost) AS SUM_lineItem_UnblendedCost, CASE WHEN lineItem_LineItemType = 'SavingsPlanCoveredUsage' AND pricing_term = 'OnDemand' THEN 'Compute Savings Plan' WHEN lineItem_LineItemType = 'Usage' AND pricing_term = 'OnDemand' THEN 'On-Demand' WHEN lineItem_LineItemType = 'Usage' AND pricing_term = 'Spot' THEN 'Spot' ELSE 'NA' END AS coverage_type, product_productFamily AS Product_productFamily, product_ProductName AS Product_ProductName, lineItem_LineItemType AS LineItem_LineItemType, pricing_term AS Pricing_term FROM AWS_CUR WHERE (lineItem_UnblendedCost > 0) AND (pricing_term IS NOT NULL) AND (product_productFamily IN ('Compute Instance')) AND (product_ProductName IN ('Amazon Elastic Compute Cloud')) GROUP BY timeInterval_Month, product_productFamily, product_ProductName, lineItem_LineItemType, pricing_term ORDER BY timeInterval_Month ASC",
  "needBackLinkingForTags": true,
  "dataGranularity": "MONTHLY",
  "timeRange": {
    "last": 12
  },
  "limit": -1
}