Cost Forecast Workflow
Use this workflow when the user wants to project future costs.
⚠️ Warning: If the user wants historical cost data, use the Cost Query Workflow. If they want to reduce costs, use the Cost Optimization Workflow.
Key Differences from Query API
| Aspect | Query API | Forecast API |
|---|---|---|
| Purpose | Historical cost data | Projected future costs |
| Time period | Past dates only | Must include future dates |
| Grouping | Up to 2 dimensions | Not supported |
includeActualCost | N/A | Include historical alongside forecast |
| Response columns | Cost, Date, Currency | Cost, Date, CostStatus, Currency |
| Max response rows | 5,000/page | 40 rows recommended |
| Timeframe | Multiple presets + Custom | Typically Custom only |
Step 1: Determine Scope
Use the same scope patterns from the Scope Reference table in the main SKILL.md.
Step 2: Choose Report Type
ActualCost is most common for forecasting. AmortizedCost for reservation/savings plan projections.
Step 3: Set Time Period
⚠️ Warning: The
todate MUST be in the future.
- Set
timeframetoCustomand providetimePeriodwithfromandtodates fromcan be in the past — shows actual costs up to today, then forecast toto- Minimum 28 days of historical cost data required
- Maximum forecast period: 10 years
Full rules: Forecast Guardrails
Step 4: Configure Dataset
- Granularity:
DailyorMonthlyrecommended - Aggregation: Typically
SumofCost - See Forecast Request Body Schema for full schema
⚠️ Warning: Grouping is NOT supported for forecast. Suggest using the Cost Query Workflow for grouped historical data instead.
Step 5: Set Forecast-Specific Options
| Field | Default | Description |
|---|---|---|
includeActualCost | true | Include historical actual costs alongside forecast |
includeFreshPartialCost | true | Include partial cost data for recent days. Requires includeActualCost: true |
Step 6: Construct and Execute
Create temp/cost-forecast.json:
json
{
"type": "ActualCost",
"timeframe": "Custom",
"timePeriod": {