Inspiration

As a League player, I was tired of stat tracking sites that just threw numbers at me. Sure, I could see my 50% win rate and 2.5 KDA, but what did that actually mean? Was I improving? What should I focus on? What's my playstyle identity?

When Spotify Wrapped drops every year, millions of people share it because it tells their story - not just "you listened to 50,000 minutes of music" but "you're in the top 1% of fans" and "your music taste evolved from X to Y." I wanted that same feeling for League of Legends.

The AWS + League hackathon was the perfect opportunity to build what I always wished existed: a year-end recap that doesn't just report stats but understands WHO you are as a player and helps you improve.

What it does

Rift Rewind transforms your League of Legends match history into a personalized, Spotify Wrapped-style year-end recap with three game-changing features:

1. Player Archetype Detection

Using custom algorithms, I analyze your playstyle across multiple dimensions (KDA patterns, damage output, vision control, champion diversity, role flexibility) to determine your unique player archetype. Are you "The Assassin," "The Strategic Support," "The Flex Master," or one of 7 other archetypes? Each comes with a personalized description that captures your essence as a player.

2. AI-Generated Epic Story

Amazon Bedrock's Claude 3 Haiku doesn't just list your stats - it weaves them into a narrative. It celebrates your growth (like improving from 33% to 55% win rate), identifies your signature moments, and makes you feel like a legend. The story is specifically tailored to your archetype and journey.

3. Actionable Performance Coaching

This is where it gets real. The system detects specific patterns in your gameplay:

  • High death count? You get: "6.4 deaths/game - Focus on positioning and map awareness. Ward defensively before pushing."
  • Low CS? "138 CS/game - Practice last-hitting in Practice Tool for 10 min daily. Aim for 7 CS/min."

No generic advice. Every tip includes your actual metric and a specific action plan.

Plus beautiful visualizations: growth analytics (early vs late season), champion mastery cards, monthly performance timeline, epic moments tracker, and diversity scoring.

How we built it

Architecture

Frontend: Pure HTML/CSS/JavaScript with League of Legends theming, deployed on Vercel Backend: AWS Lambda (Node.js 18.x) with Function URLs for instant HTTP access AI Engine: Amazon Bedrock (Claude 3 Haiku) for narrative generation Data Source: Riot Games API (Account-v1, Match-v5)

The Smart Part

I didn't just call Bedrock and hope for the best. Here's my approach:

  1. Pre-Analysis Phase

    • Fetch 50+ matches from Riot API with intelligent rate limiting
    • Aggregate statistics: KDA, damage, CS, vision, role distribution, champion pool
    • Calculate growth metrics (early season vs late season performance)
    • Detect monthly trends and performance patterns
  2. Pattern Detection Engine (Custom Algorithms)

    // Example: Archetype scoring across 10 dimensions
    - High kills + low deaths + high damage = "The Assassin"
    - High assists + vision + low deaths = "The Strategic Support"
    - 70+ diversity score + 5 roles played = "The Flex Master"
    
  3. Performance Analysis

    • Identify strengths: "Only 4 deaths/game - Your positioning is top-tier!"
    • Detect weaknesses: "Low CS for a laner - here's how to fix it"
    • Spot opportunities: "Vision score is 25, aim for 1.5 per minute"
    • Flag warnings: "Playing 35 champions - focus on mastering 3-5"
  4. Intelligent Bedrock Prompting

    • Feed Claude the archetype, detected patterns, strengths, and weaknesses
    • Provide specific metrics and recommended actions
    • Request narrative format with exact sections (Journey, Archetype Showcase, Coaching)
    • Temperature 0.7 for creative yet consistent storytelling
  5. Response Structure Return everything: archetype, patterns, AI story, stats, growth metrics, all in one JSON response for instant display

Technical Highlights

  • Serverless scaling with Lambda Function URLs (no API Gateway needed)
  • Batch processing for match details (20 at a time) with rate limit respect
  • Error resilience with fallback insights if Bedrock is unavailable
  • Regional routing for global Riot API support (Americas, Europe, Asia, SEA)
  • Smart caching of champion ID mappings (150+ champions)

Challenges we ran into

1. CORS Nightmare

Lambda Function URLs have built-in CORS support, but I initially added manual CORS headers in my response too. This caused duplicate Access-Control-Allow-Origin headers, breaking the frontend. Lesson learned: Let AWS handle CORS infrastructure, just return content.

2. Riot API Rate Limits

Fetching 50 match details means 50+ API calls. Hit rate limits hard. Solution: Batched requests (20 at a time) with 1.2-second delays between batches. Implemented graceful failure - if some matches fail, keep going with what we got.

3. Generic AI Output

Early versions of Bedrock prompts produced boring, template-like responses: "You should improve your gameplay." Useless. The breakthrough: Pre-analyzing data to detect SPECIFIC patterns, then feeding those patterns with exact metrics into Bedrock. Now it says "Your 6.4 deaths/game is high - ward defensively and review replays."

4. Archetype Accuracy

First attempt: Simple if/else logic. Result: Everyone was "The Assassin." Refined it to a scoring system across 10 archetypes with weighted metrics. A support player with high vision (40+) and assists (10+) now correctly gets "The Strategic Support," not "The Assassin."

5. GitHub Push Protection

Accidentally committed an Azure token in early development. GitHub blocked my pushes even after removing the file. Solution: Deployed directly to Vercel without pushing (for now), will clean git history later.

Accomplishments that we're proud of

🏆 Technical Innovation

  • Custom archetype detection with multi-dimensional scoring that actually works
  • Two-phase AI approach: Pre-analysis for patterns, then context-aware prompting
  • Pattern-specific coaching that's genuinely actionable (not "play better")

🎨 User Experience

  • Made stats feel shareable and personal (Spotify Wrapped energy)
  • Growth tracking that shows improvement over time (33% → 55% WR feels epic!)
  • Archetype system that gives players an identity ("I'm The Flex Master!")

Performance

  • Complete analysis of 50 matches in under 10 seconds
  • Serverless architecture that scales to zero (no idle costs)
  • Intelligent batching and error handling for reliability

💡 Real Value

This isn't just a cool demo. I'd actually use this myself. When it told the test player "Your 138 CS is low, practice 10 min daily for 7 CS/min," that's advice worth following. When it identified them as "The Flex Master" playing 35 champions, that's insight worth knowing.

What we learned

AWS Services Are Powerful Together

Lambda + Bedrock is an incredible combo. Lambda handles the heavy lifting (API calls, data processing, pattern detection) and Bedrock brings the magic (storytelling, personalization). Function URLs make deployment trivial - no API Gateway configuration needed.

AI Needs Context, Not Just Data

Feeding raw stats to Claude produces generic output. But when you do the analysis work FIRST - detect patterns, identify strengths/weaknesses, calculate trends - and then give Claude that context, it produces genuinely useful insights. AI is a collaborator, not a replacement for smart algorithms.

Good Prompts Are Engineering

Went through 15+ iterations of the Bedrock prompt. Key learnings:

  • Be specific about sections and format
  • Provide concrete examples in the prompt itself
  • Feed in the metrics you want referenced
  • Set expectations for tone (Spotify Wrapped energy!)
  • Request actionable advice, not platitudes

Players Care About Identity

The archetype feature was a late addition, but it's the most impactful. People don't just want to know their stats - they want to know WHO they are. "The Strategic Support" or "The Clutch Performer" gives them a label they can identify with and share.

Serverless Is Ready for Production

Lambda cold starts? Barely noticeable. Scaling? Automatic. Cost? Only pay when used. IAM setup was straightforward. This convinced me that serverless is viable for real products, not just prototypes.

What's next for Rift Rewind

Immediate Improvements

  1. Comparative Analysis: "You're in the top 15% of supports in your rank"
  2. Achievement Badges: Unlock titles based on archetypes and accomplishments
  3. Social Sharing: Generate shareable images with key stats
  4. Historical Tracking: Compare this season to last season

Enhanced AI Features

  1. Prediction Mode: "Based on your trajectory, you'll likely hit Gold by end of season"
  2. Champion Recommendations: "Given your playstyle, try these 3 champions"
  3. Meta Analysis: "You play Pyke, but he's 47% WR in current patch - here's why"
  4. Duo Synergy: Analyze two players for compatibility

AWS Expansion

  1. DynamoDB: Cache player data to speed up repeat queries
  2. S3 + CloudFront: Store generated recap images for sharing
  3. EventBridge: Schedule weekly mini-recaps
  4. Step Functions: Orchestrate multi-player team analysis
  5. Amazon Comprehend: Sentiment analysis on player chat data (with consent)

Monetization Ideas

  • Premium Tier: Deeper analysis, historical trends, pro player comparisons
  • Team Analytics: For esports teams to analyze roster performance
  • API Access: Let other developers build on top of the insights

Scale Vision

Imagine if every League player got a Rift Rewind at the end of each season. Millions of personalized stories, all generated by AWS and AI. That's the dream.


Built With

  • AWS Lambda (Node.js 18.x runtime)
  • Amazon Bedrock (Claude 3 Haiku)
  • Riot Games API (Account-v1, Match-v5)
  • Vercel (Frontend hosting)
  • JavaScript/HTML/CSS (Frontend)

Try It Now

🔗 Live Demo: https://riftrewind-f9s2p0vk8-moses-projects-fef9aa1f.vercel.app
💻 GitHub: https://github.com/KillMonga130/riftrewind
Lambda Function: Serverless AWS deployment with Function URL


Built solo for the AWS + League of Legends Hackathon. Because every summoner deserves to see their story.

Built With

Share this project:

Updates