
How to Build a Recommendation System using AWS Personalize
This blog shows how we can use AWS Personalize for a recommendation system. I have added all the steps and everything about how to create a personalized using AWS Console.
In today's digital landscape, personalization isn't just a nice-to-have feature—it's an expectation. Whether you're running an e-commerce platform, content streaming service, or digital marketplace, users expect recommendations tailored specifically to their preferences and behaviors. But building an effective recommendation system from scratch requires significant data science expertise, infrastructure, and time.
While building recommendation systems from scratch can be a complex undertaking involving intricate algorithms and extensive data engineering, this is where AWS Personalize shines.
A fully managed machine learning service for building real-time personalized recommendations for users.
Amazon's machine learning service makes it feasible for developers of all skill levels to implement sophisticated recommendation engines without needing a Ph.D. in machine learning.
What is a Recommendation System?
A recommendation system filters and predicts user preferences based on historical data. Personalize offers a managed, scalable machine learning service that allows developers to build and deploy real-time recommendation systems without needing ML expertise.****
Types of Recommendation Approaches
- Content-based filtering: Recommends items similar to what a user has liked before, based on item features.
- Collaborative filtering: Makes recommendations based on how similar users have interacted with items.
a. User-based: " Uses similar to you liked these items"
b. Item-based: "Users who liked this item also liked these other items - Hybrid approaches: Combines multiple techniques to overcome the limitations of any single approach.
- Contextual recommendations: Takes into account contextual information like time, location, or device.
- Session-based recommendations: Make recommendations based on a user's current session behavior rather than long-term history.
Why Use AWS Personalize?
Traditionally, building these systems requires handling:
- Feature engineering
- Model selection
- Infrastructure setup
- Real-time inference pipelines
AWS Personalize abstracts these complexities. With just a few API calls, you can ingest data, train models, and get recommendations—all while scaling with your user base.
How it works
- Data Collection - gather interaction data, user metadata, etc.
- Data preparation - Upload to S3
- Model Training - train personalized models using pre-built models
- Deployment - deploy trained models via APIs.
- Continuous Optimization - Update data and re-train the model.
🛠️ Hands-On: Building a Recommender System with AWS Personalize
AWS Service use
- S3
- AWS Personalized
- IAM
Step1: Create S3 Bucket & Upload Dataset
- Go to the S3 bucket
- Create a bucket personalize-demo-bac
- Upload your interactions.csv file
- Interactions.csv (Need to enter min 1000 data)


Note the path:
s3://personalize-demo-bac/interactions.csv
Step 2: Set Bucket Permissions for Personalize
Go to your bucket → Permissions tab → Bucket Policy and paste
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowPersonalizeReadAccess",
"Effect": "Allow",
"Principal": {
"Service": "personalize.amazonaws.com"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::personalize-demo-bac/*"
},
{
"Sid": "AllowPersonalizeListBucket",
"Effect": "Allow",
"Principal": {
"Service": "personalize.amazonaws.com"
},
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::personalize-demo-bac"
}
]
}Step 3: Create a Dataset Group
- Go to the AWS Personalize console
- Click “Dataset groups” > Create dataset group
- Name: demo-dataset-bac
- Domain: Custom
- Click on Create Dataset

Step 4: Create datasets and import data
- Click on Dropdown-> Item Interactions dataset-required

- Choose option 1 and click Next.

- Enter Dataset name: my-dataset-bac
Create a new schema
Schema name: demo-personlalized-bac

- Enter the schema field and click on Next.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
"type": "record",
"name": "Interactions",
"namespace": "com.amazonaws.personalize.schema",
"fields": [
{
"name": "USER_ID",
"type": "string"
},
{
"name": "ITEM_ID",
"type": "string"
},
{
"name": "EVENT_TYPE",
"type": "string"
},
{
"name": "TIMESTAMP",
"type": "long"
}
],
"version": "1.0"
}- Now import the job
Dataset import job: my-dataset-job
Data location: s3://personalize-demo-bac/interactions.csv

- Attach one IAM Role, then click Start Import.

- You will be able to see this message after completing the whole import data process.

Step 5: Run data analysis
Click on Run data analysis
It takes several minutes to complete

Step 6: Set up training and recommendation resources
- Click on Create solution
- Solution name: demo-solution-bac-personalized
- Solution type: Item recommendation
- Recipe: aws-similar item (Here, based on our dataset, we need to choose the solution type and recipe)
- Click on Next

Keep other things as they are
And next, create a solution

Step 7: Create a solution version
Click on Create solution version.

Give the solution version Name: first.
Click on create
It will take time to create a version.


Step 8: Create a campaign
Click on Create campaign.

Campaign name: demo-campaign
Solution: Click on the dropdown and choose the previously created solution(demo-solution-bac-personalized)
Click on Create campaign.

Here, a campaign is created.

Step 9: Test the Campaign result
To verify recommendation is working properly or not
Enter Item ID: (e.g., user88)
Click on Get recommendation.
Click on Get recommendation.

After that, we will recommend item numbers.

Conclusion:
Setting up a recommendation system using Amazon Personalize gives you a real-world view of how scalable, customizable, and effective AWS tools can be. By following each step—from data import to live campaign testing—you not only build a working solution but also gain practical insight into how personalization can drive smarter user experiences.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article