Cost explorer CLI : end date past the beginning of next month

0

While I can get a forecast https://console.aws.amazon.com/cost-management/home?region=eu-central-1#/custom?groupBy=None&hasBlended=false&hasAmortized=false&excludeDiscounts=true&excludeTaggedResources=false&excludeCategorizedResources=false&excludeForecast=false&timeRangeOption=Custom&granularity=Monthly&reportName=&reportType=CostUsage&isTemplate=true&filter=%5B%5D&chartStyle=Group&forecastTimeRangeOption=Custom&usageAs=usageQuantity&startDate=2021-08-01&endDate=2021-08-31&forecastStartDate=2021-08-19&forecastEndDate=2021-12-31 on the console, I get an error with the CLI

% aws ce get-cost-and-usage --time-period Start=2021-08-01,End=2021-12-31 --granularity MONTHLY --metrics "BlendedCost" "UnblendedCost" "UsageQuantity"

An error occurred (ValidationException) when calling the GetCostAndUsage operation: end date past the beginning of next month

Edited by: PeterS99084 on Aug 19, 2021 1:07 AM

asked 3 years ago735 views
1 Answer
0

This is the correct command:

aws ce get-cost-forecast --time-period Start=2021-08-19,End=2021-12-31 --granularity MONTHLY --metric BLENDED_COST

answered 3 years 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