An intelligent music recommendation system that uses Amazon Bedrock AI to analyze user listening patterns and generate personalized playlists through event-driven architecture.
For a complete visual diagram and detailed explanation of how the system works, see:
- 📋 SYSTEM_OVERVIEW.md - Complete architecture diagram and component explanations
- 🏗️ ARCHITECTURE.md - Technical architecture details
- 🧪 TESTING_SUMMARY.md - Testing results and cost analysis
🎧 User Listening → 🎵 Spotify API → ⚡ EventBridge → 🧠 AI Analysis → 🎵 Personalized Playlists
- EventBridge: Central event router for music events
- Lambda Functions: AI processing and playlist generation
- Amazon Bedrock: Claude/Titan models for music analysis
- SQS Queues: Async processing and retry handling
- DynamoDB: User profiles and music preferences storage
- SNS: User notifications and recommendations
- Spotify Web API
- Apple Music API
- Last.fm API (optional)
- Spent so far: $0.00 (all within AWS free tier)
- Projected for 20 playlists: $10-15 (with Bedrock access)
- Cost optimization: Using Titan model (70% cheaper than Claude)
| Component | Free Tier | With Bedrock |
|---|---|---|
| Lambda | $0.00 | $0.00 |
| DynamoDB | $0.00 | $0.00 |
| EventBridge | $0.00 | $0.00 |
| SQS | $0.00 | $0.00 |
| Bedrock AI | $0.00 | ~$0.50/song |
See TESTING_SUMMARY.md for detailed cost analysis.
cd /home/ubuntu/ai-music-recommender
python3 test-interface.py# Set up Spotify credentials (see SYSTEM_OVERVIEW.md for details)
export SPOTIFY_CLIENT_ID="your_client_id"
export SPOTIFY_CLIENT_SECRET="your_client_secret"
# Install required package
pip install spotipy
# Sync your real listening history
python3 spotify-connector.py# Send custom test events
python3 manual-test.py
# Run cost analysis
python3 test-cost-optimized.py✅ Real-time Music Analysis - Process listening activity as it happens
✅ AI-Powered Insights - Bedrock AI analyzes mood, genre, and patterns
✅ Personalized Playlists - Generate custom playlists based on your taste
✅ Cost-Optimized - Smart model selection (Titan vs Claude)
✅ Event-Driven Architecture - Scalable and fault-tolerant
✅ Cross-Platform Support - Works with Spotify, Apple Music, and more
✅ Smart Notifications - Get notified when new playlists are ready
ai-music-recommender/
├── 📋 SYSTEM_OVERVIEW.md # Complete system diagram & explanation
├── 🏗️ ARCHITECTURE.md # Technical architecture details
├── 🧪 TESTING_SUMMARY.md # Testing results & cost analysis
├── 🚀 deploy.sh # Automated deployment script
├── 🧪 test-interface.py # Interactive testing interface
├── 🎵 spotify-connector.py # Real Spotify data integration
├── infrastructure/
│ ├── cloudformation.yaml # Full AWS infrastructure
│ └── minimal-testing.yaml # Cost-optimized testing version
├── lambda-functions/
│ ├── listening-analyzer/ # AI-powered music analysis
│ ├── playlist-generator/ # Playlist creation logic
│ └── notification-sender/ # User notifications
└── tests/
└── sample-events/ # Test data and examples
# View stored data
aws dynamodb scan --table-name ai-music-recommender-user-profiles --limit 5
# Monitor Lambda logs
aws logs tail /aws/lambda/ai-music-recommender-listening-analyzer --follow
# Check costs
aws ce get-cost-and-usage --time-period Start=2024-06-01,End=2024-06-30 --granularity DAILY --metrics BlendedCost# Delete all resources when done testing
aws cloudformation delete-stack --stack-name ai-music-recommender-testing-stack- SYSTEM_OVERVIEW.md - Visual architecture diagram and complete system explanation
- ARCHITECTURE.md - Detailed technical architecture and design patterns
- TESTING_SUMMARY.md - Testing results, cost analysis, and deployment status
- spotify-setup.md - Step-by-step Spotify integration guide
The system is deployed and ready for cost-optimized testing. Start with the interactive interface:
python3 test-interface.pyEstimated testing cost: $10-15 for 20 AI-generated playlists (vs $180+ with non-optimized setup)