Skip to content
GitHubXDiscord

Solution

The Solution resource allows you to create and manage AWS Personalize Solutions that enable personalized recommendations using machine learning.

Create a basic Personalize Solution using default settings and a specified dataset group.

import AWS from "alchemy/aws/control";
const basicSolution = await AWS.Personalize.Solution("basic-solution", {
name: "BasicPersonalizeSolution",
datasetGroupArn: "arn:aws:personalize:us-east-1:123456789012:dataset-group/my-dataset-group",
performAutoML: true,
performHPO: false
});

Configure a Personalize Solution with hyperparameter optimization and a specific recipe.

const advancedSolution = await AWS.Personalize.Solution("advanced-solution", {
name: "AdvancedPersonalizeSolution",
datasetGroupArn: "arn:aws:personalize:us-east-1:123456789012:dataset-group/my-dataset-group",
performAutoML: false,
performHPO: true,
recipeArn: "arn:aws:personalize:::recipe/aws-hrnn"
});

Create a Personalize Solution that includes a custom event type for user interactions.

const eventTypeSolution = await AWS.Personalize.Solution("event-type-solution", {
name: "EventTypePersonalizeSolution",
datasetGroupArn: "arn:aws:personalize:us-east-1:123456789012:dataset-group/my-dataset-group",
eventType: "user-click",
performAutoML: true
});

Demonstrate how to create a Solution with a custom configuration.

const customConfigSolution = await AWS.Personalize.Solution("custom-config-solution", {
name: "CustomConfigPersonalizeSolution",
datasetGroupArn: "arn:aws:personalize:us-east-1:123456789012:dataset-group/my-dataset-group",
solutionConfig: {
algorithmHyperParameters: {
"numFactors": "64",
"regularization": "0.1"
},
featureTransforms: [{
featureName: "user-item-interactions",
transformType: "normalization"
}]
}
});