Creating a solution (Amazon CLI) - Amazon Personalize
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Creating a solution (Amazon CLI)

Important

After you create a solution, you can’t change its configuration. By default, all new solutions use automatic training. With automatic training, you incur training costs while your solution is active. To avoid unnecessary costs, make sure to delete the solution when you are finished. For information about training costs, see Amazon Personalize pricing.

To create a solution with the Amazon CLI, use the create-solution command. This command uses the CreateSolution API operation. The following code shows you how to create a solution that uses automatic training. It automatically creates a new solution version every five days.

To use the code, update it to give the solution a name, specify the Amazon Resource Name (ARN) of your dataset group, optionally change the training frequency, and specify the ARN of the recipe to use. For information about recipes, see Choosing a recipe.

aws personalize create-solution \ --name solution name \ --dataset-group-arn dataset group ARN \ --recipe-arn recipe ARN \ --perform-auto-training \ --solution-config "{\"autoTrainingConfig\": {\"schedulingExpression\": \"rate(5 days)\"}}"

After you create the solution, record the solution ARN for future use. With automatic training, solution version creation starts within one 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 API opearation.

When the solution version is ACTIVE, you are ready to use it to get recommendations. How you use an active solution version depends on how you get recommendations: