Amazon Forecast
Developer Guide

This is prerelease documentation for a service in preview release. It is subject to change.

As of 6/6/19, Amazon Forecast no longer supports the following recipes: DeepAR, MDN, MLP, MQRNN, RFQR, and SQF. You can continue to use predictors created with these recipes to generate forecasts. However, you can’t use these recipes to create new predictors or to update existing predictors with new data. In addition, AutoML no longer considers these recipes. We’ve made these changes to ensure that Forecast offers the highest level of accuracy and robustness. We continue to support the ARIMA, DeepAR+, ETS, NPTS, and Prophet recipes.

DeployPredictor

Deploys a predictor created using the CreatePredictor operation.

Deploying a predictor generates a forecast for every item in the dataset group that was used to train the predictor. To retrieve the forecast, use the GetForecast operation.

By default, the latest version of the predictor is deployed. Alternatively, you can deploy a specific predictor version.

Each DeployPredictor call generates a new forecast. To get a list of forecasts, use the ListForecasts operation. To run this operation and generate forecasts on a specific schedule, you can specify a scheduleExpression.

For more information about Amazon Forecast predictors, see Predictors.

Request Syntax

{ "PredictorName": "string", "ScheduleExpression": "string", "TargetCacheOffset": number, "VersionId": "string" }

Request Parameters

The request accepts the following data in JSON format.

PredictorName

The name of the predictor that you want to use to generate a forecast.

Type: String

Length Constraints: Maximum length of 256.

Pattern: ^[a-zA-Z0-9\_]+$

Required: Yes

ScheduleExpression

The schedule for generating forecasts with the specified predictor. Specify the schedule as an Amazon CloudWatch cron expression. For more information, see Cron Expressions in the Amazon CloudWatch User Guide.

Type: String

Length Constraints: Maximum length of 256.

Pattern: ^[a-zA-Z0-9\_\*\?\,\|\^\-\/\#\s\(\)\+]+$

Required: No

TargetCacheOffset

The DeployPredictor operation generates a forecast. Amazon Forecast then caches the forecast, for example, for visualization in the Amazon Forecast console. When visualizing the forecast, Amazon Forecast also caches the last part of the target time series data to provide you better context.

By default, Amazon Forecast caches the last target time series that is the size of the ForecastHorizon (which is set either in the recipe or overridden in the CreatePredictor operation that uses the recipe). For example, if ForecastHorizon is 30, Amazon Forecast caches the last 30 data points of the target time series.

Type: Integer

Required: No

VersionId

The version ID of the predictor to deploy.

Type: String

Length Constraints: Maximum length of 256.

Pattern: ^[a-zA-Z0-9\_]+$

Required: No

Response Syntax

{ "PredictorArn": "string", "PredictorName": "string", "VersionId": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

PredictorArn

The Amazon Resource Name (ARN) of the deployed predictor.

Type: String

Length Constraints: Maximum length of 256.

Pattern: ^[a-zA-Z0-9\-\_\.\/\:]+$

PredictorName

The name of the deployed predictor.

Type: String

Length Constraints: Maximum length of 256.

Pattern: ^[a-zA-Z0-9\_]+$

VersionId

The version ID of the deployed predictor.

Type: String

Length Constraints: Maximum length of 256.

Pattern: ^[a-zA-Z0-9\_]+$

Errors

InternalServiceException

Request processing has failed due to some unknown error, exception, or failure.

HTTP Status Code: 400

InvalidInputException

We can't process the request because it includes an invalid value or a value that exceeds the valid range.

HTTP Status Code: 400

InvalidStateException

Processing has reached an invalid state. Amazon Forecast returns this exception when an operation attempts to perform an action on a resource that is changing.

HTTP Status Code: 400

QuotaLimitExceededException

You have exceeded the quota limits for resources that are long-running jobs, such as import jobs, create predictors, and forecasts. You might also be creating too many resources concurrently, in which case, you might wait for resources to be created and try again.

HTTP Status Code: 400

ResourceAlreadyExistsException

There is already a resource with this name and characteristics. Try again with different settings.

HTTP Status Code: 400

ResourceNotFoundException

We can't find a resource with that name. Check the name and try again.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: