Need help for Athena query for Forecasted month-end of CUR data.

0

Hi, I want to know athena query for forecasted month-end cost.

For example: To know current month cost SELECT sum(line_item_blended_cost) AS monthToDateCost FROM "tevico-cur-database"."customers_cur_hourly_uri1" WHERE year =2023 AND month = 6 AND line_item_line_item_type NOT IN ('Credit','Refund');

Niraj
asked 10 months ago373 views
2 Answers
1

CUR Data do not have forecast information. On the other hand, there can be other options on how to pull the cost forecast. Refer to below

  1. Using aws cli:

You can use the "aws ce get-cost-forecast" command to pull the Cost Explorer forecast. Here's the link where you can find more information on the AWS cli - Cost Explorer API https://docs.aws.amazon.com/cli/latest/reference/ce/index.html

Eg: aws ce get-cost-forecast --time-period Start=2023-07-01,End=2021-12-31 --granularity MONTHLY --metric BLENDED_COST

  1. Using GetCostForecast API:

This API retrieves a forecast for how much aws predicts what you will spend over the forecast time period you provide in the request. You can refer to the Cost Explorer API link. https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_GetCostForecast.html

profile pictureAWS
EXPERT
answered 9 months ago
0

CUR data set does not provide forecasting. AWS Cost Explorer provides in-chart forecasting that you can use in a visual chart. If you would like to perform forecasting on CUR raw data, you can refer to this blog post : https://aws.amazon.com/blogs/machine-learning/forecasting-aws-spend-using-the-aws-cost-and-usage-reports-aws-glue-databrew-and-amazon-forecast/

AWS
answered 10 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