AWS CUR - Savings Plan Fee Discrepancy

0

I am observing a $60 diff for Nov between the actual AWS Invoice and AWS CUR billing Data for AWS Compute Savings Plan. Here is the query on top the CUR data.

select 'Savings Plan Usage' as Metrics, SUM(savings_plan_savings_plan_effective_cost) as savings_plan_savings_plan_effective_cost
from sl_aws_cur where year = '2023' and month = '11' -- Actual Usage $1200
UNION ALL
select 'Savings Plan Charge' as Metrics, SUM(line_item_unblended_cost) as savingsPlanFee
from sl_aws_cur where year = '2023' and month = '11'
AND line_item_line_item_type = 'SavingsPlanRecurringFee' -- Fee $1260 for 720 hours

Ideally the savings_plan_savings_plan_effective_cost & SavingsPlanRecurringFee should match exactly and same is the case for me for last couple of months. Is there any exception to that ? Thanks!

  • Did you use partial upfront in your Saving Plan?

  • @AmerO, no this is a no upfront savings plan.

  • Hi Santosh, it seems likely that your Savings Plans utilization for the month of November, 2023 is less than 100%, whereas in previous months the Savings Plans may have been fully utilized. This would indicate less compute usage in November compared to previous months. I recommend running this query from Well-Architected labs site to check your utilization % for both November and a previous month to confirm this. https://wellarchitectedlabs.com/cost-optimization/cur_queries/queries/aws_cost_management/#savings-plans-utilization If you run that, it might be best to change the date filter of WHERE CAST("concat"("year", '-', "month", '-01') AS date) = "date_trunc"('month', current_date) - INTERVAL '1' MONTH which would produce a report for last month from current date to where year = '2023' and month = '11 like you have in your query.

asked 5 months ago1143 views
3 Answers
1
Accepted Answer

Hi Santosh, it seems likely that your Savings Plans utilization for the month of November, 2023 is less than 100%, whereas in previous months the Savings Plans may have been fully utilized. This would indicate less compute usage in November compared to previous months. I recommend running this query from Well-Architected labs site to check your utilization % for both November and a previous month to confirm this. https://wellarchitectedlabs.com/cost-optimization/cur_queries/queries/aws_cost_management/#savings-plans-utilization If you run that, it might be best to change the date filter of WHERE CAST("concat"("year", '-', "month", '-01') AS date) = "date_trunc"('month', current_date) - INTERVAL '1' MONTH which would produce a report for last month from current date to where year = '2023' and month = '11 like you have in your query.

AWS
answered 5 months ago
  • Thanks a lot @rathmyle. I am getting 99.58% Savings Plan utilization for Nov. Hence the $60 diff. How do I drill down to what instance type usage has been reduced for savings plan ?

1

Santosh - Try this query to identify your EC2 usage by account, resource_id, instance type, pricing term. It should provide enough detail to identify which instances had reduced usage.

-- COMPUTE USAGE PER INSTANCE AND SPLITTING BY PURCHASE OPTION
-- For ${date_filter}, options are listed here: https://wellarchitectedlabs.com/cost/300_labs/300_cur_queries/query_help/#filtering-by-date
-- Example:
--      year = '2022' AND month = '07'
--                 -- OR --
--      line_item_usage_start_date >= now() - INTERVAL '3' month

SELECT "line_item_usage_account_id" AS "Account ID",
       "line_item_resource_id" AS "Instance ID",
       if ("product_instance_type" != '', "product_instance_type", split_part("line_item_line_item_description",' ',1)) AS "Instance Type",
       if(split_part("product_instance_type",'.',2) = 'metal', "product_instance_type",if ("product_instance_type_family" != '', "product_instance_type_family", if ("product_instance_type" != '', split_part("product_instance_type",'.',1), split_part("line_item_line_item_description",'.',1)))) AS Family,
       sum(if ("pricing_term" = 'Reserved',"line_item_usage_amount",0)) AS Reserved,
       sum(if ("pricing_term" = 'OnDemand',"line_item_usage_amount",0)) AS OnDemand,
       sum(if ("pricing_term" = '',"line_item_usage_amount",0)) AS Spot
FROM
--  ${table_name} -- Replace ${table_name} with your CUR table name
WHERE "product_product_name" = 'Amazon Elastic Compute Cloud'
      AND "line_item_resource_id" LIKE 'i-%'
      AND "line_item_operation" LIKE 'RunInstance%'
      AND (("line_item_usage_type" LIKE '%BoxUsage%') OR ("line_item_usage_type" LIKE '%SpotUsage%'))
      AND
--  ${date_filter} -- Replace ${date_filter} with an option from above.
GROUP BY "line_item_usage_account_id", "line_item_resource_id", "product_instance_type", "line_item_usage_type", "product_instance_type_family", "line_item_line_item_description"```
AWS
answered 5 months ago
  • Thanks a lot @rathmyle. Appreciate your help :)

1

Here's an additional query you can run to check the $ gap between the Savings Plan commitment and usage: select line_item_usage_type, product_purchase_option, SUM(savings_plan_total_commitment_to_date) as SP_Total_Commitment, SUM(line_item_unblended_cost) as SP_Unblended_Cost, SUM(savings_plan_used_commitment) as SP_Used_Commitment from <cur_table> where line_item_line_item_type = 'SavingsPlanRecurringFee' group by 1,2

AWS
answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions