AWS.Forecast reference
CreateAutoPredictor
Section titled “CreateAutoPredictor”Source:
src/AWS/Forecast/CreateAutoPredictor.ts
Runtime binding for forecast:CreateAutoPredictor — kick off (re)training
of an AutoPredictor from a dataset group, the scheduled-retraining step of
a grandfathered Forecast deployment. Also grants iam:PassRole
(conditioned to forecast.amazonaws.com) for the KMS-encryption role an
EncryptionConfig passes to the service.
Predictor ARNs are created at runtime, so the binding takes no arguments
and grants forecast:CreateAutoPredictor on *. Provide the
implementation with Effect.provide(AWS.Forecast.CreateAutoPredictorHttp).
CreateAutoPredictor: Training Predictors
Section titled “CreateAutoPredictor: Training Predictors”// initconst createAutoPredictor = yield* AWS.Forecast.CreateAutoPredictor();
// runtimeconst predictor = yield* createAutoPredictor({ PredictorName: "demand_2026_07", ForecastHorizon: 14, ForecastFrequency: "D", DataConfig: { DatasetGroupArn: group.datasetGroupArn },});CreateDatasetImportJob
Section titled “CreateDatasetImportJob”Source:
src/AWS/Forecast/CreateDatasetImportJob.ts
Runtime binding for forecast:CreateDatasetImportJob — start an
asynchronous import of training data from S3 into a Forecast dataset, the
standard scheduled-ingest step of a grandfathered Forecast deployment.
Also grants iam:PassRole (conditioned to forecast.amazonaws.com) for
the S3 data-access role the import assumes.
The import job’s ARN is created at runtime, so the binding takes no
arguments and grants forecast:CreateDatasetImportJob on *. Provide the
implementation with Effect.provide(AWS.Forecast.CreateDatasetImportJobHttp).
CreateDatasetImportJob: Importing Data
Section titled “CreateDatasetImportJob: Importing Data”// initconst createDatasetImportJob = yield* AWS.Forecast.CreateDatasetImportJob();
// runtimeconst job = yield* createDatasetImportJob({ DatasetImportJobName: "daily_2026_07_14", DatasetArn: dataset.datasetArn, DataSource: { S3Config: { Path: "s3://my-bucket/demand.csv", RoleArn: dataAccessRole.roleArn, }, }, TimestampFormat: "yyyy-MM-dd",});CreateForecast
Section titled “CreateForecast”Source:
src/AWS/Forecast/CreateForecast.ts
Runtime binding for forecast:CreateForecast — generate a fresh forecast
from a trained predictor, the scheduled step that keeps the queryable
forecast current after each retraining or data import.
Forecast ARNs are created at runtime, so the binding takes no arguments
and grants forecast:CreateForecast on *. Provide the implementation
with Effect.provide(AWS.Forecast.CreateForecastHttp).
CreateForecast: Generating Forecasts
Section titled “CreateForecast: Generating Forecasts”// initconst createForecast = yield* AWS.Forecast.CreateForecast();
// runtimeconst generated = yield* createForecast({ ForecastName: "demand_2026_07_14", PredictorArn: predictorArn,});CreateForecastExportJob
Section titled “CreateForecastExportJob”Source:
src/AWS/Forecast/CreateForecastExportJob.ts
Runtime binding for forecast:CreateForecastExportJob — export a complete
forecast to S3 as CSV/Parquet, the bulk-consumption path that complements
per-item lookups via QueryForecast.
Export job ARNs are created at runtime, so the binding takes no arguments
and grants forecast:CreateForecastExportJob on *, plus iam:PassRole
(conditioned to forecast.amazonaws.com) for the export destination role.
Provide the implementation with
Effect.provide(AWS.Forecast.CreateForecastExportJobHttp).
CreateForecastExportJob: Exporting Forecasts
Section titled “CreateForecastExportJob: Exporting Forecasts”// initconst createForecastExportJob = yield* AWS.Forecast.CreateForecastExportJob();
// runtimeconst job = yield* createForecastExportJob({ ForecastExportJobName: "demand_2026_07_14_export", ForecastArn: forecastArn, Destination: { S3Config: { Path: "s3://my-bucket/forecasts/", RoleArn: exportRoleArn }, },});CreateWhatIfAnalysis
Section titled “CreateWhatIfAnalysis”Source:
src/AWS/Forecast/CreateWhatIfAnalysis.ts
Runtime binding for forecast:CreateWhatIfAnalysis — start a what-if
analysis on a baseline forecast, the container under which scenario
forecasts (price changes, promotions) are created and later compared via
QueryWhatIfForecast.
What-if analysis ARNs are created at runtime, so the binding takes no
arguments and grants forecast:CreateWhatIfAnalysis on *. Provide the
implementation with Effect.provide(AWS.Forecast.CreateWhatIfAnalysisHttp).
CreateWhatIfAnalysis: What-If Scenarios
Section titled “CreateWhatIfAnalysis: What-If Scenarios”// initconst createWhatIfAnalysis = yield* AWS.Forecast.CreateWhatIfAnalysis();
// runtimeconst analysis = yield* createWhatIfAnalysis({ WhatIfAnalysisName: "promo_scenarios", ForecastArn: forecastArn,});CreateWhatIfForecast
Section titled “CreateWhatIfForecast”Source:
src/AWS/Forecast/CreateWhatIfForecast.ts
Runtime binding for forecast:CreateWhatIfForecast — create a scenario
forecast under a what-if analysis, transforming the baseline time series
(or replacing it from S3) so the outcome can be compared with
QueryWhatIfForecast.
What-if forecast ARNs are created at runtime, so the binding takes no
arguments and grants forecast:CreateWhatIfForecast on *, plus
iam:PassRole (conditioned to forecast.amazonaws.com) for the
replacement-data-source role. Provide the implementation with
Effect.provide(AWS.Forecast.CreateWhatIfForecastHttp).
CreateWhatIfForecast: What-If Scenarios
Section titled “CreateWhatIfForecast: What-If Scenarios”// initconst createWhatIfForecast = yield* AWS.Forecast.CreateWhatIfForecast();
// runtimeconst scenario = yield* createWhatIfForecast({ WhatIfForecastName: "price_drop_10pct", WhatIfAnalysisArn: analysisArn, TimeSeriesTransformations: [ { Action: { AttributeName: "price", Operation: "MULTIPLY", Value: 0.9, }, }, ],});CreateWhatIfForecastExport
Section titled “CreateWhatIfForecastExport”Source:
src/AWS/Forecast/CreateWhatIfForecastExport.ts
Runtime binding for forecast:CreateWhatIfForecastExport — export one or
more scenario forecasts to S3 as CSV/Parquet so they can be compared
offline or fed into downstream analytics.
What-if forecast export ARNs are created at runtime, so the binding takes
no arguments and grants forecast:CreateWhatIfForecastExport on *, plus
iam:PassRole (conditioned to forecast.amazonaws.com) for the export
destination role. Provide the implementation with
Effect.provide(AWS.Forecast.CreateWhatIfForecastExportHttp).
CreateWhatIfForecastExport: Exporting Forecasts
Section titled “CreateWhatIfForecastExport: Exporting Forecasts”// initconst createWhatIfForecastExport = yield* AWS.Forecast.CreateWhatIfForecastExport();
// runtimeconst job = yield* createWhatIfForecastExport({ WhatIfForecastExportName: "promo_scenarios_export", WhatIfForecastArns: [scenarioArn], Destination: { S3Config: { Path: "s3://my-bucket/whatif/", RoleArn: exportRoleArn }, },});Dataset
Section titled “Dataset”Source:
src/AWS/Forecast/Dataset.ts
An Amazon Forecast dataset — a typed, domain-scoped collection of time-series (or metadata) records described by a schema. Creating the dataset is a cheap metadata operation; bulk imports and training happen through separate import jobs and predictors.
Dataset: Creating a Dataset
Section titled “Dataset: Creating a Dataset”const dataset = yield* Forecast.Dataset("Demand", { domain: "CUSTOM", datasetType: "TARGET_TIME_SERIES", dataFrequency: "D", schema: { attributes: [ { attributeName: "item_id", attributeType: "string" }, { attributeName: "timestamp", attributeType: "timestamp" }, { attributeName: "target_value", attributeType: "float" }, ], },});DatasetGroup
Section titled “DatasetGroup”Source:
src/AWS/Forecast/DatasetGroup.ts
An Amazon Forecast dataset group — a domain-scoped container that groups the datasets used to train predictors. Creating the group is cheap; the expensive training work lives in predictors and forecasts provisioned separately.
DatasetGroup: Creating a Dataset Group
Section titled “DatasetGroup: Creating a Dataset Group”Custom Dataset Group
const group = yield* Forecast.DatasetGroup("Sales", { domain: "CUSTOM",});Dataset Group with Attached Datasets
const group = yield* Forecast.DatasetGroup("Sales", { domain: "RETAIL", datasetArns: [dataset.datasetArn], tags: { team: "planning" },});DeleteResourceTree
Section titled “DeleteResourceTree”Source:
src/AWS/Forecast/DeleteResourceTree.ts
Runtime binding for forecast:DeleteResourceTree — delete an entire tree
of runtime-created Forecast resources (a predictor and its forecasts and
exports, or a dataset’s import jobs) in a single call, the cost-hygiene
counterpart to the Create* bindings.
The target ARNs are created at runtime, so the binding takes no arguments
and grants forecast:DeleteResourceTree on *. Provide the implementation
with Effect.provide(AWS.Forecast.DeleteResourceTreeHttp).
DeleteResourceTree: Cleaning Up
Section titled “DeleteResourceTree: Cleaning Up”// initconst deleteResourceTree = yield* AWS.Forecast.DeleteResourceTree();
// runtimeyield* deleteResourceTree({ ResourceArn: predictorArn });DescribeAutoPredictor
Section titled “DescribeAutoPredictor”Source:
src/AWS/Forecast/DescribeAutoPredictor.ts
Runtime binding for forecast:DescribeAutoPredictor — poll a training run
started by CreateAutoPredictor until its Status reaches ACTIVE
(or CREATE_FAILED) and read its estimated time remaining.
Predictor ARNs are created at runtime, so the binding takes no arguments
and grants forecast:DescribeAutoPredictor on *. Provide the
implementation with Effect.provide(AWS.Forecast.DescribeAutoPredictorHttp).
DescribeAutoPredictor: Training Predictors
Section titled “DescribeAutoPredictor: Training Predictors”// initconst describeAutoPredictor = yield* AWS.Forecast.DescribeAutoPredictor();
// runtimeconst detail = yield* describeAutoPredictor({ PredictorArn: predictor.PredictorArn!,});yield* Effect.log(`training ${detail.Status}`);DescribeDatasetImportJob
Section titled “DescribeDatasetImportJob”Source:
src/AWS/Forecast/DescribeDatasetImportJob.ts
Runtime binding for forecast:DescribeDatasetImportJob — poll an import
job started by CreateDatasetImportJob until its Status reaches
ACTIVE (or CREATE_FAILED), and read its field statistics.
Import-job ARNs are created at runtime, so the binding takes no arguments
and grants forecast:DescribeDatasetImportJob on *. Provide the
implementation with
Effect.provide(AWS.Forecast.DescribeDatasetImportJobHttp).
DescribeDatasetImportJob: Importing Data
Section titled “DescribeDatasetImportJob: Importing Data”// initconst describeDatasetImportJob = yield* AWS.Forecast.DescribeDatasetImportJob();
// runtimeconst detail = yield* describeDatasetImportJob({ DatasetImportJobArn: job.DatasetImportJobArn!,});if (detail.Status === "CREATE_FAILED") { yield* Effect.logError(`import failed: ${detail.Message}`);}DescribeForecast
Section titled “DescribeForecast”Source:
src/AWS/Forecast/DescribeForecast.ts
Runtime binding for forecast:DescribeForecast — poll a forecast
generation started by CreateForecast until its Status reaches
ACTIVE and it becomes queryable.
Forecast ARNs are created at runtime, so the binding takes no arguments
and grants forecast:DescribeForecast on *. Provide the implementation
with Effect.provide(AWS.Forecast.DescribeForecastHttp).
DescribeForecast: Generating Forecasts
Section titled “DescribeForecast: Generating Forecasts”// initconst describeForecast = yield* AWS.Forecast.DescribeForecast();
// runtimeconst detail = yield* describeForecast({ ForecastArn: generated.ForecastArn!,});yield* Effect.log(`forecast ${detail.Status}`);DescribeForecastExportJob
Section titled “DescribeForecastExportJob”Source:
src/AWS/Forecast/DescribeForecastExportJob.ts
Runtime binding for forecast:DescribeForecastExportJob — poll the status
of a forecast export started with CreateForecastExportJob until
the files land in S3.
Export job ARNs are created at runtime, so the binding takes no arguments
and grants forecast:DescribeForecastExportJob on *. Provide the
implementation with
Effect.provide(AWS.Forecast.DescribeForecastExportJobHttp).
DescribeForecastExportJob: Exporting Forecasts
Section titled “DescribeForecastExportJob: Exporting Forecasts”// initconst describeForecastExportJob = yield* AWS.Forecast.DescribeForecastExportJob();
// runtimeconst { Status } = yield* describeForecastExportJob({ ForecastExportJobArn: exportJobArn,});DescribeWhatIfAnalysis
Section titled “DescribeWhatIfAnalysis”Source:
src/AWS/Forecast/DescribeWhatIfAnalysis.ts
Runtime binding for forecast:DescribeWhatIfAnalysis — poll the status of
a what-if analysis created with CreateWhatIfAnalysis until it is
ACTIVE and scenario forecasts can be created under it.
What-if analysis ARNs are created at runtime, so the binding takes no
arguments and grants forecast:DescribeWhatIfAnalysis on *. Provide the
implementation with
Effect.provide(AWS.Forecast.DescribeWhatIfAnalysisHttp).
DescribeWhatIfAnalysis: What-If Scenarios
Section titled “DescribeWhatIfAnalysis: What-If Scenarios”// initconst describeWhatIfAnalysis = yield* AWS.Forecast.DescribeWhatIfAnalysis();
// runtimeconst { Status } = yield* describeWhatIfAnalysis({ WhatIfAnalysisArn: analysisArn,});DescribeWhatIfForecast
Section titled “DescribeWhatIfForecast”Source:
src/AWS/Forecast/DescribeWhatIfForecast.ts
Runtime binding for forecast:DescribeWhatIfForecast — poll the status of
a scenario forecast created with CreateWhatIfForecast until it is
ACTIVE and queryable via QueryWhatIfForecast.
What-if forecast ARNs are created at runtime, so the binding takes no
arguments and grants forecast:DescribeWhatIfForecast on *. Provide the
implementation with
Effect.provide(AWS.Forecast.DescribeWhatIfForecastHttp).
DescribeWhatIfForecast: What-If Scenarios
Section titled “DescribeWhatIfForecast: What-If Scenarios”// initconst describeWhatIfForecast = yield* AWS.Forecast.DescribeWhatIfForecast();
// runtimeconst { Status } = yield* describeWhatIfForecast({ WhatIfForecastArn: scenarioArn,});DescribeWhatIfForecastExport
Section titled “DescribeWhatIfForecastExport”Source:
src/AWS/Forecast/DescribeWhatIfForecastExport.ts
Runtime binding for forecast:DescribeWhatIfForecastExport — poll the
status of a scenario-forecast export started with
CreateWhatIfForecastExport until the files land in S3.
Export ARNs are created at runtime, so the binding takes no arguments and
grants forecast:DescribeWhatIfForecastExport on *. Provide the
implementation with
Effect.provide(AWS.Forecast.DescribeWhatIfForecastExportHttp).
DescribeWhatIfForecastExport: Exporting Forecasts
Section titled “DescribeWhatIfForecastExport: Exporting Forecasts”// initconst describeWhatIfForecastExport = yield* AWS.Forecast.DescribeWhatIfForecastExport();
// runtimeconst { Status } = yield* describeWhatIfForecastExport({ WhatIfForecastExportArn: exportArn,});GetAccuracyMetrics
Section titled “GetAccuracyMetrics”Source:
src/AWS/Forecast/GetAccuracyMetrics.ts
Runtime binding for forecast:GetAccuracyMetrics — read a trained
(legacy) predictor’s backtest accuracy metrics (wQL, RMSE, MAPE, WAPE) so
an ops function can gate promotion of a retrained model on its accuracy.
Predictor ARNs are created at runtime, so the binding takes no arguments
and grants forecast:GetAccuracyMetrics on *. Provide the
implementation with Effect.provide(AWS.Forecast.GetAccuracyMetricsHttp).
GetAccuracyMetrics: Training Predictors
Section titled “GetAccuracyMetrics: Training Predictors”// initconst getAccuracyMetrics = yield* AWS.Forecast.GetAccuracyMetrics();
// runtimeconst metrics = yield* getAccuracyMetrics({ PredictorArn: predictorArn,});QueryForecast
Section titled “QueryForecast”Source:
src/AWS/Forecast/QueryForecast.ts
Runtime binding for forecast:QueryForecast — the Forecast Query data
plane. Retrieves the predicted time series for a single item from a
generated forecast, the call an API or personalization function makes to
serve predictions.
Forecast ARNs are created at runtime, so the binding takes no arguments
and grants forecast:QueryForecast on *. Provide the implementation
with Effect.provide(AWS.Forecast.QueryForecastHttp).
QueryForecast: Querying Forecasts
Section titled “QueryForecast: Querying Forecasts”// initconst queryForecast = yield* AWS.Forecast.QueryForecast();
// runtimeconst { Forecast } = yield* queryForecast({ ForecastArn: forecastArn, Filters: { item_id: "sku_1234" },});const p50 = Forecast?.Predictions?.p50 ?? [];QueryWhatIfForecast
Section titled “QueryWhatIfForecast”Source:
src/AWS/Forecast/QueryWhatIfForecast.ts
Runtime binding for forecast:QueryWhatIfForecast — retrieve the
predicted time series for a single item from a what-if forecast, so an
application can compare a scenario (price change, promotion) against the
baseline served by QueryForecast.
What-if forecast ARNs are created at runtime, so the binding takes no
arguments and grants forecast:QueryWhatIfForecast on *. Provide the
implementation with Effect.provide(AWS.Forecast.QueryWhatIfForecastHttp).
QueryWhatIfForecast: Querying Forecasts
Section titled “QueryWhatIfForecast: Querying Forecasts”// initconst queryWhatIfForecast = yield* AWS.Forecast.QueryWhatIfForecast();
// runtimeconst { Forecast } = yield* queryWhatIfForecast({ WhatIfForecastArn: whatIfForecastArn, Filters: { item_id: "sku_1234" },});ResumeResource
Section titled “ResumeResource”Source:
src/AWS/Forecast/ResumeResource.ts
Runtime binding for forecast:ResumeResource — resume a stopped Forecast
monitor so it continues evaluating a deployed predictor’s drift.
Monitor ARNs are created at runtime, so the binding takes no arguments and
grants forecast:ResumeResource on *. Provide the implementation with
Effect.provide(AWS.Forecast.ResumeResourceHttp).
ResumeResource: Managing Jobs
Section titled “ResumeResource: Managing Jobs”// initconst resumeResource = yield* AWS.Forecast.ResumeResource();
// runtimeyield* resumeResource({ ResourceArn: monitorArn });StopResource
Section titled “StopResource”Source:
src/AWS/Forecast/StopResource.ts
Runtime binding for forecast:StopResource — halt an in-progress Forecast
job (dataset import, predictor training, forecast generation, or any of
their export jobs), the cost-control lever for a runaway training run. A
stopped job cannot be resumed.
Job ARNs are created at runtime, so the binding takes no arguments and
grants forecast:StopResource on *. Provide the implementation with
Effect.provide(AWS.Forecast.StopResourceHttp).
StopResource: Managing Jobs
Section titled “StopResource: Managing Jobs”// initconst stopResource = yield* AWS.Forecast.StopResource();
// runtimeyield* stopResource({ ResourceArn: predictorArn });