Never miss an NBA game again! This AWS-powered system automatically sends you real-time NBA game updates through text messages or email.
- Sends you live NBA game scores and updates
- Works automatically on game days
- Delivers updates through text or email
- Shows you quarter-by-quarter scores
- Tells you what channel the game is on
- Keeps you updated on game status (scheduled, in progress, or final)
System Architecture 🏗️
An overview of how the system components work together to deliver your game updates
- An AWS account
- An API key from SportsData.io (they have a free tier)
- Basic Python knowledge
- About 15 minutes to set everything up
- Go to AWS SNS console
- Create a new topic
- Add your phone number or email as a subscriber
- Save the topic ARN - you'll need it later
- Create a new Python Lambda function
- Copy the code from
lambda_function.py
- Add these environment variables:
NBA_API_KEY
: Your SportsData.io API keySNS_TOPIC_ARN
: The SNS topic ARN from Step 1
- Go to EventBridge
- Create a new rule
- Set it to run every hour (or however often you want updates)
- Point it to your Lambda function
You'll get messages that look like this:
For a finished game:
Game Status: Final
Away Team: GSW
Home Team: LAL
Final Score: 120-115
Start Time: 2024-01-07T19:30:00
Channel: ESPN
Quarters: Q1: 30-28, Q2: 25-27, Q3: 32-30, Q4: 33-30
For a game in progress:
Game Status: In Progress
Away Team: GSW
Home Team: LAL
Start Time: 2024-01-07T19:30:00
Channel: ESPN
Quarters: Q1: 30-28, Q2: 25-27
For an upcoming game:
Game Status: Scheduled
Away Team: GSW
Home Team: LAL
Start Time: 2024-01-07T19:30:00
Channel: ESPN
lambda_function.py
: The main Lambda function that handles everything
- EventBridge triggers your Lambda function
- Lambda checks SportsData.io for today's games
- The code formats the game data nicely
- AWS SNS sends you the formatted updates
- All times are handled in Central Time
- Not getting updates? Check your SNS subscription
- Error messages? Verify your API key
- Wrong times? The system uses Central Time
- Missing data? The API might be having issues - the code will retry automatically