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
gefragt vor 10 Monaten386 Aufrufe
2 Antworten
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
EXPERTE
beantwortet vor 10 Monaten
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
beantwortet vor 10 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen