Guide · Amazon Personalize · Domain Recommenders
Amazon Personalize Domain Recommenders for MCP Servers — ECOMMERCE and VIDEO_ON_DEMAND Pre-Built Recommenders
Amazon Personalize offers two paths for deploying recommendations: custom dataset groups (where you pick a recipe, train a solution, and manage the solution version lifecycle manually) and domain dataset groups (where you choose a domain and Personalize provides pre-built recommenders that auto-update on a schedule). Domain recommenders require less operational overhead — no CreateSolutionVersionCommand, no UpdateCampaignCommand — but constrain you to predefined use cases. This guide covers when to choose domain vs. custom, how to set up an ECOMMERCE or VIDEO_ON_DEMAND domain group, all available pre-built recommenders, CreateRecommenderCommand, auto-update configuration, and calling recommenders via recommenderArn at inference time.
TL;DR
Domain dataset groups set domain: "ECOMMERCE" or domain: "VIDEO_ON_DEMAND" at creation. Within a domain group, use CreateRecommenderCommand with a domain-specific recipeArn (format: arn:aws:personalize:::recipe/aws-ecommerce-* or arn:aws:personalize:::recipe/aws-vod-*) instead of creating a solution. Call the resulting recommender using recommenderArn (not campaignArn) in GetRecommendationsCommand. Domain recommenders auto-retrain every 7 days by default — no manual training jobs needed.
Domain vs. custom dataset groups: choosing the right path
The core trade-off between domain and custom groups:
| Feature | Domain dataset group | Custom dataset group |
|---|---|---|
| Setup complexity | Lower — no solution, no campaign | Higher — solution + solution version + campaign |
| Retraining | Automatic (every 7 days by default) | Manual — you trigger CreateSolutionVersionCommand |
| Recipe flexibility | Fixed per use case (5–6 options per domain) | Full choice of 6 recipes including custom hyperparameters |
| Schema requirements | Domain-specific reserved fields required | Minimal required fields (USER_ID, ITEM_ID, TIMESTAMP) |
| Inference parameter | recommenderArn |
campaignArn |
| Best for | Standard e-commerce or media use cases with domain-matched data | Non-standard domains (tool recommendations, document retrieval, internal tooling) |
For most MCP server use cases (tool recommendations, document ranking, workflow suggestions), custom dataset groups are the better fit because your data does not conform to the ECOMMERCE or VIDEO_ON_DEMAND schemas. Domain groups excel when your MCP server wraps an e-commerce or media platform and your Items dataset naturally contains fields like PRICE, CATEGORY_L1, GENRES, or CREATION_TIMESTAMP.
ECOMMERCE domain dataset group
Create the domain group with domain: "ECOMMERCE":
import { PersonalizeClient, CreateDatasetGroupCommand } from "@aws-sdk/client-personalize";
const personalize = new PersonalizeClient({ region: "us-east-1" });
const { datasetGroupArn } = await personalize.send(new CreateDatasetGroupCommand({
name: "mcp-ecommerce-recommendations",
domain: "ECOMMERCE",
}));
The ECOMMERCE Interactions schema must include EVENT_TYPE as a non-nullable string — it is required (not optional) for domain groups, unlike custom groups where it is optional. The reserved event types for ECOMMERCE are:
Purchase— highest weight positive signalClick— standard positive signalView— weak positive signal (use with impressions)Search— search query event (requiressearchQueryin properties)
The ECOMMERCE Items schema supports these domain-specific reserved fields that enable the category-based recommenders:
const ecommerceItemsSchema = {
type: "record",
name: "Items",
namespace: "com.amazonaws.personalize.schema",
fields: [
{ name: "ITEM_ID", type: "string" },
{ name: "PRICE", type: ["null", "float"], default: null }, // list price
{ name: "CATEGORY_L1", type: ["null", "string"], default: null, metadata: { categorical: true } },
{ name: "CATEGORY_L2", type: ["null", "string"], default: null, metadata: { categorical: true } },
{ name: "PRODUCT_DESCRIPTION", type: ["null", "string"], default: null },
{ name: "NAME", type: ["null", "string"], default: null },
{ name: "CREATION_TIMESTAMP", type: ["null", "long"], default: null }, // Unix seconds
],
version: "1.0",
};
Not all reserved fields are required — only ITEM_ID is mandatory. The more fields you populate, the better the category-based and popularity-based recommenders perform. CATEGORY_L1 is the most impactful for the "best sellers by category" and "most viewed by category" recommenders.
ECOMMERCE pre-built recommenders
Five pre-built recommenders are available for ECOMMERCE domain groups:
| Recipe ARN suffix | Use case | Required at inference |
|---|---|---|
aws-ecommerce-recommended-for-you |
Personalized items for a specific user based on purchase/click history | userId |
aws-ecommerce-customers-who-viewed-x-also-viewed |
Related items (collaborative similarity via View events) | itemId |
aws-ecommerce-frequently-bought-together |
Related items purchased together (Purchase event co-occurrence) | itemId |
aws-ecommerce-best-sellers-by-category |
Top items in a category (requires CATEGORY_L1 in Items dataset) | Filter with $CATEGORY parameter |
aws-ecommerce-most-viewed-by-category |
Most viewed items in a category | Filter with $CATEGORY parameter |
VIDEO_ON_DEMAND domain dataset group
The VOD domain targets media and streaming platforms. The Interactions schema must include EVENT_TYPE (required), and common VOD event types are:
Watch— highest weight for a video-on-demand contextClick— user clicked on a title (not watched)Search— user searched for content
The VOD Items schema uses these domain-specific reserved fields:
const vodItemsSchema = {
type: "record",
name: "Items",
namespace: "com.amazonaws.personalize.schema",
fields: [
{ name: "ITEM_ID", type: "string" },
{ name: "GENRES", type: ["null", "string"], default: null, metadata: { categorical: true } },
// GENRES uses pipe-separated values for multi-genre items: "Drama|Thriller|Crime"
{ name: "YEAR", type: ["null", "long"], default: null },
{ name: "CREATION_TIMESTAMP", type: ["null", "long"], default: null }, // Unix seconds
],
version: "1.0",
};
The GENRES field uses pipe-separated values for multi-category items: "Action|Adventure|Sci-Fi". Personalize tokenizes on the pipe delimiter and treats each genre as a separate categorical signal. Do not use comma separation — only pipe (|) is recognized as the multi-value delimiter for domain reserved fields.
VOD pre-built recommenders
Five pre-built recommenders are available for VIDEO_ON_DEMAND domain groups:
| Recipe ARN suffix | Use case | Required at inference |
|---|---|---|
aws-vod-recommended-for-you |
Personalized titles for a specific user based on watch/click history | userId |
aws-vod-because-you-watched-x |
Titles similar to a given title (Watch event co-occurrence) | itemId |
aws-vod-more-like-x |
Titles with similar attributes (content-based + collaborative) | itemId |
aws-vod-top-picks |
Trending titles based on recent Watch events (no userId needed) | None required |
aws-vod-trending-now |
Globally trending titles weighted toward recent 7 days | None required |
Creating a recommender
import { CreateRecommenderCommand, DescribeRecommenderCommand } from "@aws-sdk/client-personalize";
const { recommenderArn } = await personalize.send(new CreateRecommenderCommand({
name: "ecommerce-recommended-for-you",
datasetGroupArn,
recipeArn: "arn:aws:personalize:::recipe/aws-ecommerce-recommended-for-you",
recommenderConfig: {
minRecommendationRequestsPerSecond: 1, // billing floor TPS (default 1)
itemExplorationConfig: {
explorationWeight: "0.3", // 0 = exploit fully, 1 = explore fully
explorationItemAgeCutOff: "30", // days; new items older than this excluded from exploration
},
trainingDataConfig: {
excludedDatasetColumns: {
// Exclude specific columns from training if they are noisy or not relevant
// "Items": ["PRODUCT_DESCRIPTION"],
},
},
enableMetadataWithRecommendations: true, // return item metadata columns in response
},
}));
// Poll until ACTIVE (~10–30 minutes for first training)
let status = "";
while (status !== "ACTIVE") {
const resp = await personalize.send(new DescribeRecommenderCommand({ recommenderArn }));
status = resp.recommender!.status!;
if (status === "CREATE FAILED") throw new Error(resp.recommender!.failureReason ?? "Failed");
if (status !== "ACTIVE") await new Promise(r => setTimeout(r, 30_000));
}
When enableMetadataWithRecommendations: true, the GetRecommendationsCommand response includes the item's metadata columns in each result without requiring a separate database lookup. This is a domain recommender-only feature not available in custom campaigns.
Calling a recommender at inference time
Use recommenderArn instead of campaignArn:
import { PersonalizeRuntimeClient, GetRecommendationsCommand }
from "@aws-sdk/client-personalize-runtime";
const runtime = new PersonalizeRuntimeClient({ region: "us-east-1" });
const result = await runtime.send(new GetRecommendationsCommand({
recommenderArn: "arn:aws:personalize:us-east-1:123456789012:recommender/ecommerce-recommended-for-you",
userId: "user-42",
numResults: 10,
// filterArn and filterValues work the same as with campaigns
}));
// When enableMetadataWithRecommendations is true:
for (const item of result.itemList ?? []) {
console.log(item.itemId, item.score);
// item.metadata is populated with Items dataset columns
// e.g. { PRICE: "29.99", CATEGORY_L1: "electronics", NAME: "Widget Pro" }
if (item.metadata) {
console.log("Price:", item.metadata.PRICE);
console.log("Category:", item.metadata.CATEGORY_L1);
}
}
Auto-update configuration
Domain recommenders retrain automatically on a default 7-day schedule. To customize the schedule or disable auto-update:
import { UpdateRecommenderCommand } from "@aws-sdk/client-personalize";
// Disable automatic training (useful when managing training costs explicitly)
await personalize.send(new UpdateRecommenderCommand({
recommenderArn,
recommenderConfig: {
enableAutomaticTraining: false,
// All other config fields must be re-specified if you want to keep them
minRecommendationRequestsPerSecond: 1,
itemExplorationConfig: {
explorationWeight: "0.3",
explorationItemAgeCutOff: "30",
},
},
}));
// Or adjust the auto-training schedule (uses standard Personalize training frequency)
await personalize.send(new UpdateRecommenderCommand({
recommenderArn,
recommenderConfig: {
enableAutomaticTraining: true,
trainingDataConfig: {
excludedDatasetColumns: {},
},
},
}));
When auto-update is disabled, you must trigger manual training with CreateRecommenderCommand... actually with domain recommenders you trigger a re-training by calling UpdateRecommenderCommand with the same config — AWS initiates a training run when configuration changes are submitted. For fully manual control, disable auto-update and use UpdateRecommenderCommand as your training trigger.
Monitoring recommender health
import { DescribeRecommenderCommand } from "@aws-sdk/client-personalize";
const info = await personalize.send(new DescribeRecommenderCommand({ recommenderArn }));
const rec = info.recommender!;
console.log("Status:", rec.status);
// "ACTIVE" | "CREATE IN_PROGRESS" | "CREATE FAILED" | "DELETE IN_PROGRESS" | "INACTIVE"
console.log("Last updated:", rec.lastUpdatedDateTime);
console.log("Latest update status:", rec.latestRecommenderUpdate?.status);
// "CREATE IN_PROGRESS" means auto-update is running
// "ACTIVE" means the latest training completed and the recommender is current
// modelMetrics available on the solution inside the recommender
// (retrieved via DescribeSolutionVersionCommand on the latest solution version)
console.log("Failure reason:", rec.failureReason); // non-null if status is CREATE FAILED
The INACTIVE status means the recommender has been paused to reduce costs. An inactive recommender does not serve recommendations. To reactivate, call UpdateRecommenderCommand with any configuration change — Personalize automatically restores it to ACTIVE status during the next training cycle. Inactive recommenders are created when the minRecommendationRequestsPerSecond is set to 0 or when the data source is insufficient for training.
Domain recommenders vs custom recipes — when to switch
Start with a domain recommender when your data fits an ECOMMERCE or VOD schema. Consider migrating to a custom dataset group when:
- You need the
aws-personalized-rankingrecipe for search re-ranking (not available in domain groups) - Your item catalog does not naturally have
CATEGORY_L1,GENRES, or other domain reserved fields - You need non-standard hyperparameters (custom exploration schedules, HPO tuning)
- Your use case is not e-commerce or media — tool recommendations, document ranking, workflow suggestions all fit better in custom groups
- You need
aws-item-affinityoraws-item-attribute-affinityrecipes (domain-only recommenders do not expose these)
Migrating from domain to custom requires creating a new dataset group — you cannot change a domain group's domain after creation, nor convert it to a custom group. Plan the architecture before ingesting significant interaction history.