Serverless, low-latency product recommendation engine powered by Amazon Bedrock and DynamoDB.
Explore the code »
Report Bug
·
Request Feature
A fully serverless, AI-driven recommendation system built on AWS.
The platform automatically generates normalized, reusable product tags using Amazon Bedrock (GPT-OSS-20B) and computes personalized recommendations based on user interaction signals.
Designed for high performance and scalability, the system delivers personalized product rankings with an average end-to-end latency of ~280 ms, making it suitable for real-time e-commerce and content platforms.
User interactions are translated into tag-level preference scores stored in DynamoDB.
Product relevance is calculated by aggregating user scores across shared tags and ranking products accordingly.
User actions generate credits that influence recommendation scores. Each action updates the user's tag affinity:
| Action | Credits |
|---|---|
| Click | +5 |
| Add to Favorites | +20 |
| Purchase | +40 |
| Dislike | -20 |
API Gateway → Lambda → DynamoDB → Bedrock → CloudWatch
| Service | Purpose |
|---|---|
| Amazon Bedrock | AI-based product tag generation (GPT-OSS-20B) |
| AWS Lambda | Serverless compute for tagging and recommendations |
| Amazon DynamoDB | Product catalog & user preference storage |
| Amazon API Gateway | Secure HTTP endpoints |
| Amazon EventBridge | Scheduled background processing |
| Amazon CloudWatch | Logging, metrics, and monitoring |
- ⚡ Average recommendation latency: ~280 ms
- 📈 Horizontally scalable: Lambda auto-scales with traffic
- 💰 Cost-efficient: Pay-per-request, no idle infrastructure
- API Gateway throttling and rate limits
- IAM-based Lambda permissions
- No public database access
- Environment variables for configuration
- CloudWatch monitoring and alarms
| Attribute | Type | Description |
|---|---|---|
| PK | String | Product ID |
| tags | List | Normalized product tags |
| other product attributes | String | Title, description, metadata |
| Attribute | Type | Description |
|---|---|---|
| PK | String | USER#<user_id> |
| SK | String | TAG#<tag_name> |
| score | Number | User affinity score |
Amazon Bedrock is used to generate generalized, reusable product tags optimized for recommendation engines (e.g. Book, Romance, Electronics, Sci-Fi).
This ensures:
- High tag reusability
- Better collaborative filtering
- Reduced sparsity in user preference data
For simplicity, the current implementation passes the user_id directly in the request body.
This is not considered a production-ready authentication approach, but a conscious trade-off to focus on building and optimizing the recommendation engine itself.
In a production environment, this would be replaced with JWT-based authentication (e.g. Cognito, Auth0, or a custom identity provider) enforced at the API Gateway or Lambda level.
Screen.Recording.2026-01-03.at.3.59.40.PM.online-video-cutter.com.mp4
The frontend for this project was vibe-coded.
The primary focus of this repository is backend architecture, data modeling, and recommendation logic, not UI development.
Frontend implementation is intentionally minimal to keep attention on the recommendation engine and AWS system design.
- E-commerce product recommendations
- Content personalization platforms
- Cold-start mitigation using AI tagging
- Behavioral analytics systems