Skip to main content

solutions

Creates, updates, deletes, gets or lists a solutions resource.

Overview

Namesolutions
TypeResource
Idaws.personalize.solutions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the solution. (pattern: <code>^[a-zA-Z0-9][a-zA-Z0-9-_]*</code>)
auto_ml_resultobjectWhen performAutoML is true, specifies the best recipe found.
creation_date_timestring (date-time)The creation date and time (in Unix time) of the solution.
dataset_group_arnstringThe Amazon Resource Name (ARN) of the dataset group that provides the training data. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>)
event_typestringThe event type (for example, 'click' or 'like') that is used for training the model. If no eventType is provided, Amazon Personalize uses all interactions for training with equal weight regardless of type.
last_updated_date_timestring (date-time)The date and time (in Unix time) that the solution was last updated.
latest_solution_updateobjectProvides a summary of the latest updates to the solution.
latest_solution_versionobjectDescribes the latest version of the solution, including the status and the ARN.
perform_auto_mlbooleanWe don't recommend enabling automated machine learning. Instead, match your use case to the available Amazon Personalize recipes. For more information, see Determining your use case. When true, Amazon Personalize performs a search for the best USER_PERSONALIZATION recipe from the list specified in the solution configuration (recipeArn must not be specified). When false (the default), Amazon Personalize uses recipeArn for training.
perform_auto_trainingbooleanSpecifies whether the solution automatically creates solution versions. The default is True and the solution automatically creates new solution versions every 7 days. For more information about auto training, see Creating and configuring a solution.
perform_hpobooleanWhether to perform hyperparameter optimization (HPO) on the chosen recipe. The default is false.
perform_incremental_updatebooleanA Boolean value that indicates whether incremental training updates are performed on the model. When enabled, this allows the model to learn from new data more frequently without requiring full retraining, which enables near real-time personalization. This parameter is supported only for solutions that use the semantic-similarity recipe
recipe_arnstringThe ARN of the recipe used to create the solution. This is required when performAutoML is false. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>)
solution_arnstringThe ARN of the solution. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>)
solution_configobjectDescribes the configuration properties for the solution.
statusstringThe status of the solution. A solution can be in one of the following states: CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED DELETE PENDING > DELETE IN_PROGRESS

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_solutionselectregionDescribes a solution. For more information on solutions, see CreateSolution.
list_solutionsselectregionReturns a list of solutions in a given dataset group. When a dataset group is not specified, all the solutions associated with the account are listed. The response provides the properties for each solution, including the Amazon Resource Name (ARN). For more information on solutions, see CreateSolution.
create_solutioninsertregion, name, datasetGroupArnBy default, all new solutions use automatic training. With automatic training, you incur training costs while your solution is active. To avoid unnecessary costs, when you are finished you can update the solution to turn off automatic training. For information about training costs, see Amazon Personalize pricing. Creates the configuration for training a model (creating a solution version). This configuration includes the recipe to use for model training and optional training configuration, such as columns to use in training and feature transformation parameters. For more information about configuring a solution, see Creating and configuring a solution. By default, new solutions use automatic training to create solution versions every 7 days. You can change the training frequency. Automatic solution version creation starts within one hour after the solution is ACTIVE. If you manually create a solution version within the hour, the solution skips the first automatic training. For more information, see Configuring automatic training. To turn off automatic training, set performAutoTraining to false. If you turn off automatic training, you must manually create a solution version by calling the CreateSolutionVersion operation. After training starts, you can get the solution version's Amazon Resource Name (ARN) with the ListSolutionVersions API operation. To get its status, use the DescribeSolutionVersion. After training completes you can evaluate model accuracy by calling GetSolutionMetrics. When you are satisfied with the solution version, you deploy it using CreateCampaign. The campaign provides recommendations to a client through the GetRecommendations API. Amazon Personalize doesn't support configuring the hpoObjective for solution hyperparameter optimization at this time. Status A solution can be in one of the following states: CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED DELETE PENDING > DELETE IN_PROGRESS To get the status of the solution, call DescribeSolution. If you use manual training, the status must be ACTIVE before you call CreateSolutionVersion. Related APIs UpdateSolution ListSolutions CreateSolutionVersion DescribeSolution DeleteSolution ListSolutionVersions DescribeSolutionVersion
update_solutionupdateregion, solutionArnUpdates an Amazon Personalize solution to use a different automatic training configuration. When you update a solution, you can change whether the solution uses automatic training, and you can change the training frequency. For more information about updating a solution, see Updating a solution. A solution update can be in one of the following states: CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED To get the status of a solution update, call the DescribeSolution API operation and find the status in the latestSolutionUpdate.
delete_solutiondeleteregionDeletes all versions of a solution and the Solution object itself. Before deleting a solution, you must delete all campaigns based on the solution. To determine what campaigns are using the solution, call ListCampaigns and supply the Amazon Resource Name (ARN) of the solution. You can't delete a solution if an associated SolutionVersion is in the CREATE PENDING or IN PROGRESS state. For more information on solutions, see CreateSolution.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Describes a solution. For more information on solutions, see CreateSolution.

SELECT
name,
auto_ml_result,
creation_date_time,
dataset_group_arn,
event_type,
last_updated_date_time,
latest_solution_update,
latest_solution_version,
perform_auto_ml,
perform_auto_training,
perform_hpo,
perform_incremental_update,
recipe_arn,
solution_arn,
solution_config,
status
FROM aws.personalize.solutions
WHERE region = '{{ region }}' -- required
;

INSERT examples

By default, all new solutions use automatic training. With automatic training, you incur training costs while your solution is active. To avoid unnecessary costs, when you are finished you can update the solution to turn off automatic training. For information about training costs, see Amazon Personalize pricing. Creates the configuration for training a model (creating a solution version). This configuration includes the recipe to use for model training and optional training configuration, such as columns to use in training and feature transformation parameters. For more information about configuring a solution, see Creating and configuring a solution. By default, new solutions use automatic training to create solution versions every 7 days. You can change the training frequency. Automatic solution version creation starts within one hour after the solution is ACTIVE. If you manually create a solution version within the hour, the solution skips the first automatic training. For more information, see Configuring automatic training. To turn off automatic training, set performAutoTraining to false. If you turn off automatic training, you must manually create a solution version by calling the CreateSolutionVersion operation. After training starts, you can get the solution version's Amazon Resource Name (ARN) with the ListSolutionVersions API operation. To get its status, use the DescribeSolutionVersion. After training completes you can evaluate model accuracy by calling GetSolutionMetrics. When you are satisfied with the solution version, you deploy it using CreateCampaign. The campaign provides recommendations to a client through the GetRecommendations API. Amazon Personalize doesn't support configuring the hpoObjective for solution hyperparameter optimization at this time. Status A solution can be in one of the following states: CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED DELETE PENDING > DELETE IN_PROGRESS To get the status of the solution, call DescribeSolution. If you use manual training, the status must be ACTIVE before you call CreateSolutionVersion. Related APIs UpdateSolution ListSolutions CreateSolutionVersion DescribeSolution DeleteSolution ListSolutionVersions DescribeSolutionVersion

INSERT INTO aws.personalize.solutions (
name,
performHPO,
performAutoML,
performAutoTraining,
performIncrementalUpdate,
recipeArn,
datasetGroupArn,
eventType,
solutionConfig,
tags,
region
)
SELECT
'{{ name }}' /* required */,
{{ performHPO }},
{{ performAutoML }},
{{ performAutoTraining }},
{{ performIncrementalUpdate }},
'{{ recipeArn }}',
'{{ datasetGroupArn }}' /* required */,
'{{ eventType }}',
'{{ solutionConfig }}',
'{{ tags }}',
'{{ region }}'
RETURNING
solution_arn
;

UPDATE examples

Updates an Amazon Personalize solution to use a different automatic training configuration. When you update a solution, you can change whether the solution uses automatic training, and you can change the training frequency. For more information about updating a solution, see Updating a solution. A solution update can be in one of the following states: CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED To get the status of a solution update, call the DescribeSolution API operation and find the status in the latestSolutionUpdate.

UPDATE aws.personalize.solutions
SET
solutionArn = '{{ solutionArn }}',
performAutoTraining = {{ performAutoTraining }},
performIncrementalUpdate = {{ performIncrementalUpdate }},
solutionUpdateConfig = '{{ solutionUpdateConfig }}'
WHERE
region = '{{ region }}' --required
AND solutionArn = '{{ solutionArn }}' --required
RETURNING
solution_arn;

DELETE examples

Deletes all versions of a solution and the Solution object itself. Before deleting a solution, you must delete all campaigns based on the solution. To determine what campaigns are using the solution, call ListCampaigns and supply the Amazon Resource Name (ARN) of the solution. You can't delete a solution if an associated SolutionVersion is in the CREATE PENDING or IN PROGRESS state. For more information on solutions, see CreateSolution.

DELETE FROM aws.personalize.solutions
WHERE region = '{{ region }}' --required
;