DEV Community

Taylor D Jones
Taylor D Jones

Posted on

DevOps Challenge: Day 2 – Building an Automated NBA Score Alert System with AWS

Welcome to Day 2 of my DevOps Challenge! Today, I focused on implementing an automated NBA score alert system using AWS services like SNS, Lambda, and EventBridge. This project is a great hands-on way to explore cloud automation, event-driven workflows, and security best practices in AWS.

AWS Architecture

🏀 The Goal: Real-Time NBA Alerts

The goal is simple: fetch live NBA game scores from an external API and send real-time notifications via SMS or email to subscribed users. To achieve this, I leveraged:
• Amazon SNS for sending notifications
• AWS Lambda for processing game data
• Amazon EventBridge for scheduling updates
• IAM Security following least privilege principles

🛠️ What I Did Today

1️⃣ Setting Up Amazon SNS for Notifications

I started by creating an SNS topic to handle message distribution. Subscribers (either via email or SMS) will receive updates as new scores come in. One key step was confirming email subscriptions to ensure proper delivery.

2️⃣ Deploying the Lambda Function

Next, I created an AWS Lambda function in Python, which fetches live NBA scores from SportsData.io and formats them for delivery. The Lambda function also uses environment variables to securely store the API key and SNS topic ARN.

3️⃣ Automating with Amazon EventBridge

To keep notifications timely, I scheduled the function using EventBridge Rules. I set up a cron job that triggers the Lambda function at specific intervals, ensuring fans receive the latest game updates without manual intervention.

4️⃣ Implementing IAM Security Best Practices

Security is crucial in any cloud deployment. I followed least privilege access by creating IAM roles that grant only the necessary permissions for Lambda, SNS, and EventBridge. This reduces the risk of unauthorized access or misconfiguration.

🚀 Lessons Learned
• Event-driven automation is powerful – With just a few AWS services, I automated a notification system that runs on its own.
• IAM security should never be an afterthought – Applying least privilege policies ensures services have just the right level of access.
• Lambda functions are great for lightweight tasks – Fetching, processing, and sending notifications with Lambda made the system both scalable and cost-efficient.

Have you built a similar notification system? What use case would you automate with AWS? Let’s discuss! 👇

Top comments (0)