- Newest
- Most votes
- Most comments
Creating a Personalize Recommender for an e-commerce domain using CDK is not directly supported in the same way as creating a Solution. This is because Recommenders are specifically designed for use with Domain dataset groups, which have predefined use cases.
To create a Recommender for an e-commerce domain, you would typically use the CreateRecommender API or its equivalent in SDKs. The process involves specifying a name for the recommender, the dataset group ARN, and a recipe ARN that corresponds to a Domain dataset group use case.
While CDK doesn't have a direct construct for creating a Recommender, you can still achieve this by using a custom resource or by invoking the AWS SDK within your CDK code. Here's a conceptual approach of how you might do this:
- Set up your Domain dataset group for e-commerce.
- Choose an appropriate use case (recipe) for your e-commerce domain, such as "Top picks for you" or "Recommended for you".
- Use a custom resource or the AWS SDK to call the CreateRecommender API with the required parameters.
The reason CDK doesn't have a direct construct for Recommenders is likely because they are more dynamic and use-case specific compared to general Solutions. Recommenders are tied to Domain dataset groups and their predefined use cases, which may not fit well into the more static nature of infrastructure-as-code tools like CDK.
If you need to create a Recommender as part of your infrastructure, you might consider using a combination of CDK for setting up the dataset group and other Personalize resources, and then use a custom resource or a separate script to create the Recommender once the dataset group is ready.
Sources
CreateRecommender - Amazon Personalize
Creating domain recommenders in Amazon Personalize - Amazon Personalize
Relevant content
- asked 9 months ago
Thanks, I will use Custom Resource for this
Helpful links for others with similar issue: