Skip to content

GetCostForecast

Source: src/AWS/CostExplorer/GetCostForecast.ts

Runtime binding for ce:GetCostForecast.

Forecast how much AWS predicts you will spend over a future time period, with an optional prediction interval. Provide the implementation with Effect.provide(AWS.CostExplorer.GetCostForecastHttp).

// init — account-level binding takes no resource
const getCostForecast = yield* AWS.CostExplorer.GetCostForecast();
// runtime
const result = yield* getCostForecast({
TimePeriod: { Start: "2026-08-01", End: "2026-09-01" },
Metric: "UNBLENDED_COST",
Granularity: "MONTHLY",
});
const forecast = result.Total?.Amount;