solutions
Creates, updates, deletes, gets or lists a solutions resource.
Overview
| Name | solutions |
| Type | Resource |
| Id | aws.personalize.solutions |
Fields
The following fields are returned by SELECT queries:
- describe_solution
- list_solutions
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the solution. (pattern: <code>^[a-zA-Z0-9][a-zA-Z0-9-_]*</code>) |
auto_ml_result | object | When performAutoML is true, specifies the best recipe found. |
creation_date_time | string (date-time) | The creation date and time (in Unix time) of the solution. |
dataset_group_arn | string | The Amazon Resource Name (ARN) of the dataset group that provides the training data. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
event_type | string | The 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_time | string (date-time) | The date and time (in Unix time) that the solution was last updated. |
latest_solution_update | object | Provides a summary of the latest updates to the solution. |
latest_solution_version | object | Describes the latest version of the solution, including the status and the ARN. |
perform_auto_ml | boolean | We 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_training | boolean | Specifies 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_hpo | boolean | Whether to perform hyperparameter optimization (HPO) on the chosen recipe. The default is false. |
perform_incremental_update | boolean | A 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_arn | string | The 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_arn | string | The ARN of the solution. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
solution_config | object | Describes the configuration properties for the solution. |
status | string | The 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 |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the solution. (pattern: <code>^[a-zA-Z0-9][a-zA-Z0-9-_]*</code>) |
creation_date_time | string (date-time) | The date and time (in Unix time) that the solution was created. |
last_updated_date_time | string (date-time) | The date and time (in Unix time) that the solution was last updated. |
recipe_arn | string | The Amazon Resource Name (ARN) of the recipe used by the solution. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
solution_arn | string | The Amazon Resource Name (ARN) of the solution. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
status | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_solution | select | region | Describes a solution. For more information on solutions, see CreateSolution. | |
list_solutions | select | region | Returns 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_solution | insert | region, name, datasetGroupArn | 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 | |
update_solution | update | region, solutionArn | 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. | |
delete_solution | delete | region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_solution
- list_solutions
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
;
Returns 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.
SELECT
name,
creation_date_time,
last_updated_date_time,
recipe_arn,
solution_arn,
status
FROM aws.personalize.solutions
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_solution
- Manifest
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
;
# Description fields are for documentation purposes
- name: solutions
props:
- name: region
value: "{{ region }}"
description: Required parameter for the solutions resource.
- name: name
value: "{{ name }}"
description: |
The name for the solution.
- name: performHPO
value: {{ performHPO }}
description: |
Whether to perform hyperparameter optimization (HPO) on the specified or selected recipe. The default is false. When performing AutoML, this parameter is always true and you should not set it to false.
- name: performAutoML
value: {{ performAutoML }}
description: |
We don't recommend enabling automated machine learning. Instead, match your use case to the available Amazon Personalize recipes. For more information, see Choosing a recipe. Whether to perform automated machine learning (AutoML). The default is false. For this case, you must specify recipeArn. When set to true, Amazon Personalize analyzes your training data and selects the optimal USER_PERSONALIZATION recipe and hyperparameters. In this case, you must omit recipeArn. Amazon Personalize determines the optimal recipe by running tests with different values for the hyperparameters. AutoML lengthens the training process as compared to selecting a specific recipe.
- name: performAutoTraining
value: {{ performAutoTraining }}
description: |
Whether the solution uses automatic training to create new solution versions (trained models). The default is True and the solution automatically creates new solution versions every 7 days. You can change the training frequency by specifying a schedulingExpression in the AutoTrainingConfig as part of solution configuration. For more information about automatic training, see Configuring automatic training. 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. 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.
- name: performIncrementalUpdate
value: {{ performIncrementalUpdate }}
description: |
Whether to perform incremental training updates on your 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.
- name: recipeArn
value: "{{ recipeArn }}"
description: |
The Amazon Resource Name (ARN) of the recipe to use for model training. This is required when performAutoML is false. For information about different Amazon Personalize recipes and their ARNs, see Choosing a recipe.
- name: datasetGroupArn
value: "{{ datasetGroupArn }}"
description: |
The Amazon Resource Name (ARN) of the dataset group that provides the training data.
- name: eventType
value: "{{ eventType }}"
description: |
When your have multiple event types (using an EVENT_TYPE schema field), this parameter specifies which event type (for example, 'click' or 'like') is used for training the model. If you do not provide an eventType, Amazon Personalize will use all interactions for training with equal weight regardless of type.
- name: solutionConfig
description: |
The configuration properties for the solution. When performAutoML is set to true, Amazon Personalize only evaluates the autoMLConfig section of the solution configuration. Amazon Personalize doesn't support configuring the hpoObjective at this time.
value:
eventValueThreshold: "{{ eventValueThreshold }}"
hpoConfig:
hpoObjective:
type_: "{{ type_ }}"
metricName: "{{ metricName }}"
metricRegex: "{{ metricRegex }}"
hpoResourceConfig:
maxNumberOfTrainingJobs: "{{ maxNumberOfTrainingJobs }}"
maxParallelTrainingJobs: "{{ maxParallelTrainingJobs }}"
algorithmHyperParameterRanges:
integerHyperParameterRanges:
- name: "{{ name }}"
minValue: {{ minValue }}
maxValue: {{ maxValue }}
continuousHyperParameterRanges:
- name: "{{ name }}"
minValue: {{ minValue }}
maxValue: {{ maxValue }}
categoricalHyperParameterRanges:
- name: "{{ name }}"
values: "{{ values }}"
algorithmHyperParameters: "{{ algorithmHyperParameters }}"
featureTransformationParameters: "{{ featureTransformationParameters }}"
autoMLConfig:
metricName: "{{ metricName }}"
recipeList:
- "{{ recipeList }}"
eventsConfig:
eventParametersList:
- eventType: "{{ eventType }}"
eventValueThreshold: {{ eventValueThreshold }}
weight: {{ weight }}
optimizationObjective:
itemAttribute: "{{ itemAttribute }}"
objectiveSensitivity: "{{ objectiveSensitivity }}"
trainingDataConfig:
excludedDatasetColumns: "{{ excludedDatasetColumns }}"
includedDatasetColumns: "{{ includedDatasetColumns }}"
autoTrainingConfig:
schedulingExpression: "{{ schedulingExpression }}"
- name: tags
description: |
A list of tags to apply to the solution.
value:
- tagKey: "{{ tagKey }}"
tagValue: "{{ tagValue }}"
UPDATE examples
- update_solution
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
- delete_solution
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
;