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.

UpdatePredictor

Updates a predictor's configuration, including the retraining schedule and override values for various parameters.

If you change only the retraining schedule, Amazon Forecast does not create a new predictor (it doesn't retrain the model). However, if you change other parameters, such as ForecastHorizon, Amazon Forecast creates a new version of the predictor.

To stop scheduled updates, specify "none" for ScheduleExpression.

Request Syntax

{ "ForecastHorizon": number, "ForecastParameters": { "string" : "string" }, "PredictorName": "string", "RecipeParameters": { "BackTestWindowCount": number, "BackTestWindowOffset": number, "DefaultTrainingSubsampleRatio": number, "GroupByForecastKeys": [ "string" ], "HolidayCalendarName": "string", "MetricsBuckets": [ "string" ] }, "ScheduleExpression": "string", "TrainingParameters": { "string" : "string" } }

Request Parameters

The request accepts the following data in JSON format.

ForecastHorizon

Specifies the number of time-steps of the forecast. The forecast horizon is also called the prediction length.

Type: Integer

Required: No

ForecastParameters

The forecast parameters to override when running inference to generate a forecast.

Type: String to string map

Key Length Constraints: Maximum length of 256.

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

Value Length Constraints: Maximum length of 256.

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

Required: No

PredictorName

The name of the predictor to update.

Type: String

Length Constraints: Maximum length of 256.

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

Required: Yes

RecipeParameters

The recipe-level parameters.

Type: RecipeParameters object

Required: No

ScheduleExpression

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

To stop scheduled updates, specify "none".

Type: String

Length Constraints: Maximum length of 256.

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

Required: No

TrainingParameters

The training parameters to override for model training. The parameters that you can override are listed in the individual recipes in Choosing an Amazon Forecast Recipe.

Type: String to string map

Key Length Constraints: Maximum length of 256.

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

Value Length Constraints: Maximum length of 256.

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

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 predictor.

Type: String

Length Constraints: Maximum length of 256.

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

PredictorName

The name of the updated predictor.

Type: String

Length Constraints: Maximum length of 256.

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

VersionId

The version ID of the 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: