<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by                               Adekoya Precious on Medium]]></title>
        <description><![CDATA[Stories by                               Adekoya Precious on Medium]]></description>
        <link>https://medium.com/@adekoyapreciouspa?source=rss-329e09fbc885------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*T18a5Zi_4Qb5FTzqnTnWeg.png</url>
            <title>Stories by                               Adekoya Precious on Medium</title>
            <link>https://medium.com/@adekoyapreciouspa?source=rss-329e09fbc885------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 12:27:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@adekoyapreciouspa/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Game Day Notification Serverless App Using AWS Services]]></title>
            <link>https://medium.com/@adekoyapreciouspa/game-day-notification-serverless-app-using-aws-services-9ce70c9ebaaf?source=rss-329e09fbc885------2</link>
            <guid isPermaLink="false">https://medium.com/p/9ce70c9ebaaf</guid>
            <dc:creator><![CDATA[                              Adekoya Precious]]></dc:creator>
            <pubDate>Mon, 03 Feb 2025 16:12:28 GMT</pubDate>
            <atom:updated>2025-02-03T16:12:28.399Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Intro</strong></h3><p>In this guide, I’ll show you how to create a game day notification app using AWS services — a perfect project for tech enthusiasts and DevOps learners. We will use AWS Lambda, SNS ( Simple Notification Service), and AWS Event-bridge to create the notification application.</p><p>AWS Lambda: This is used to run code without provisioning or managing servers.AWS Lambda is a serverless computing platform that allows developers to run code responding to events. Use cases are IoT backends, web applications, File processing etc. This makes use of Lambda Fuctions.</p><p><strong>AWS SNS: </strong>Amazon Simple Notification Service (Amazon SNS) is a web service that makes it easy to set up, operate, and send notifications from the cloud. This service allows you to send messages to emails, SMS, and others as far as they are subscribed. It makes use of SNS topics.</p><p><strong>AWS Event-Bridge: </strong>Amazon EventBridge is a tool that helps different apps and AWS services talk to each other by passing events, like when something changes or a task needs to happen. It listens for these events and sends them to the right place, like a Lambda function or an email service. This makes it easy to automate tasks, react to changes in real-time, and connect different systems. It’s great for scheduling jobs or linking apps together. This makes use of Event Topics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/1*VQLMUMhtAtUwseOpiadyFQ.png" /></figure><h3>Prerequisites</h3><ul><li><strong><em>AWS Account</em></strong></li><li><strong><em>Basic Python Knowledge</em>:</strong> Familiarity with Python to write and deploy Lambda functions.</li><li><strong><em>Sportdata.io account</em></strong>: Create a free tier account on <a href="https://sportsdata.io/">SportsData</a>, and navigate to subscriptions to get your NBA API.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eaXif020yUlHklUB9S762w.png" /></figure><h3><strong>Use Case</strong></h3><p>You just got a job at a gaming company, the company needs to keep fans updated about game schedules and changes. This is your first project to build a serverless notification application. This project will teach you how to build a serverless, automated system for real-time notifications.</p><p>By the end, you’ll have hands-on experience with AWS Lambda, EventBridge, SNS, and more. Let’s dive in!</p><h3><strong>Overview of the Project</strong></h3><p>The goal is to notify users about upcoming game schedules using real-time alerts. This system involves:</p><ol><li>API Gateway: Fetching game schedules from an external API.</li></ol><p>2. Lambda Function: Processing the API data.</p><p>3. EventBridge: Scheduling and automating notifications.</p><p>4. SNS (Simple Notification Service): Delivering notifications via email or SMS.</p><p><strong>Step 1: Configuring SNS for Notification</strong></p><p>Go to SNS in the AWS Console and create an SNS Topic:</p><p>Select “Standard” type.</p><p>Set a name for your notification topic.</p><p>Note the Topic’s ARN.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PDBlKnczfD3AQgnlre_uNg.png" /></figure><p>After creating the topic.</p><p>Subscribe to the Topic.</p><p>Add your email or phone number, I added my email and a friend&#39;s email while I was creating mine so I could send NBA notifications to them. You can go ahead to add as many emails.</p><p>Next, go to your email to confirm the subscription.</p><p>I also added my phone number, I got a message with a key to subscribe with my phone number.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mvz5WUBM2W7H2R3IMKW36A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t3EETyn7eIfMoAQfMRFfrg.png" /></figure><p><strong>Step 2: Set Up Your Lambda Function</strong></p><p>We would need to set up an IAM role first, then the lambda function.</p><p>The IAM role would grant lambda access to send the data to the SNS that has been created.</p><p>We would create a policy and attach the policy to the role.</p><p>Navigate to IAM on your AWS console</p><p>Click on a policy to create an IAM policy, the policy can be found in my GitHub repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cgF7MToVx7-k1TyCfWsm6A.png" /></figure><p>Create a role next, attach the policy created and an AWS manages policy called AWSLambdaBasicExecutionRole to the role you are creating.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hpkh7v-9poeABaMPGQX2nQ.png" /></figure><p>Next, we would create a Lambda function to process the game data and send notifications.</p><p>Go to Lambda in the AWS Management Console.</p><p>Create a New Function:</p><p>Select “Author from scratch”.</p><p>Use Python as the runtime.</p><p>Write the Code: The code can be found in my GitHub repository: <a href="https://github.com/Preshydee/game_day_notification_project/blob/main/lambda_function.py">https://github.com/Preshydee/game_day_notification_project/blob/main/lambda_function.py</a></p><p>Deploy the code (Run the deploy command )</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sqhw38vcloAA2nDgB5t8Hw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xxl-0qotOaeelUdD3XrkuA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DU6rPFyzbdFyAuaQ2tMHnA.png" /></figure><p>Navigate to the configuration of the lambda function and then go ahead to</p><p>Add the environment variables: Which are the SNS_TOPIC_ARN and the NBA_API_KEY</p><p>Test out the application by clicking “TEST”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3fxFsNhD3s_twbu5OxIVTw.png" /></figure><p>You should get an email that looks like this.</p><p><strong>Step 3: Creating the EventBridge Rule</strong></p><p>You have set up your application and you are getting notifications in your email now. Time to set up the event bridge so it triggers the code to run every day by 1 pm and sends the NBA notification to all the fans subscribed daily at the specified time.</p><p>So all subscribers and fans can get notified and not miss upcoming games.</p><p>EventBridge will automate the execution of the Lambda function.</p><p>Open EventBridge in the AWS Console.</p><p>Create a Rule:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8pbw_HzTTMbve6-3wfL2YA.png" /></figure><p>Define a schedule (e.g., every day at 1 PM).</p><p>Set the Target:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rjyf90Fai5fFBg5sT80CJg.png" /></figure><p>Choose your Lambda function as the target.</p><p>Save the Rule and test it to ensure the Lambda function triggers at the correct time.</p><p><strong>Step 5: Monitoring and Debugging</strong></p><p>Use CloudWatch to monitor logs and metrics.</p><p>Open CloudWatch Logs and locate your Lambda function logs.</p><p>Set up alarms to track errors or high latency.</p><p><strong>Congratulations! You’ve built a real-time notification system using AWS. This project showcases serverless architecture’s scalability and demonstrates your ability to design and implement cloud-based solutions.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9ce70c9ebaaf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build a Weather Dashboard: Using Python Script, AWS S3 and Open Weather API.]]></title>
            <link>https://medium.com/@adekoyapreciouspa/build-a-weather-dashboard-using-python-script-aws-s3-and-open-weather-api-8a291417d8a1?source=rss-329e09fbc885------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a291417d8a1</guid>
            <dc:creator><![CDATA[                              Adekoya Precious]]></dc:creator>
            <pubDate>Fri, 17 Jan 2025 15:26:09 GMT</pubDate>
            <atom:updated>2025-01-17T15:26:09.084Z</atom:updated>
            <content:encoded><![CDATA[<h3>Build a Weather Dashboard: Using Python Script, AWS S3 and Openweather API.</h3><h3>Intro</h3><p>Welcome to my first blog post on Medium! I’m thrilled to share my journey as I tackle my first project in the #DevOps30DaysChallenge. This challenge is all about building practical solutions, exploring essential tools, and growing my skills hands-on.</p><p>For this first project of the #DevOps30DaysChallenge, I will be creating a weather dashboard that fetches real-time data from an API and stores it as JSON files in AWS S3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*0u8vuT_3hc2Ks7FlrrFWDQ.png" /></figure><p>In this post, I’ll walk you through how I accomplished this project and what I learned along the way. Stay tuned for more as I continue to build, learn, and share!</p><h4>Prerequisites (PROJECT 1)</h4><p>Before diving into the project, I set up a few essentials:</p><ol><li><strong>AWS Account</strong></li><li><strong>IAM Access Credentials</strong></li><li><strong>VS Code</strong></li><li><strong>GitHub Repository</strong>: This is for version control and collaboration.</li><li><strong>OpenWeather API: </strong>Create an account on the website, and the API will be sent to your email.</li><li><strong>Desire to Learn</strong>: A must-have for tackling new challenges.</li></ol><p>You can find the complete project on my GitHub repository. <a href="https://github.com/Preshydee/Real-time-weather-dashboard_project">https://github.com/Preshydee/Real-time-weather-dashboard_project</a></p><p>The repository includes the following files and folders:</p><ul><li>src/• Contains the main Python scripts.</li><li>tests/• Holds test scripts.</li><li>data/• Used for local data storage.</li><li>.env• Securely stores environment variables.</li><li>requirements.txt• Lists Python dependencies.</li><li>.gitignore• Excludes unnecessary files from version control</li><li>weather-dashboard.py This holds the Python script</li></ul><h3>Use Case:</h3><p>I am a DevOps engineer at a DevOps Daily Organization, a company dedicated to providing real-time weather data to farmers. I was given an exciting task: to automate our data collection process. The goal was to eliminate manual workflows, streamline the process, and store weather data as JSON files in AWS S3 for easy access and scalability.</p><p>Our dashboard delivers real-time weather insights, crucial for farmers making time-sensitive decisions. However, the manual process of fetching and processing data was not only inefficient but also prone to errors. My mission as a new DevOps engineer is to automate this workflow using the OpenWeather API.</p><p>In this blog, I’ll share how I approached the task, the tools I used, the challenges I faced, and the lessons I learned while implementing this solution.</p><p><strong>STEP 1: Setting Up the Project Environment</strong></p><p>To begin, I logged into the AWS Management Console and navigated to the IAM service to create a new IAM user. I assigned the user the necessary permissions by attaching the AmazonS3FullAccess policy. After that, I downloaded the user’s access key ID and secret key for authentication.</p><p>Next, I configured the AWS CLI within the VSCode terminal. I provided the necessary credentials (access and secret keys) and set the default AWS region.</p><p>With the environment set up, I created the following project structure:</p><ul><li><strong>Folders</strong>srctests and data directories</li><li><strong>Files</strong>: .env, .gitignore, requirements.txt, and weather-dashboard.py (located in the src directory)</li></ul><p>To obtain the OpenWeather API, I created an account with OpenWeather and requested an API key, which was sent to my email. Once I received the key, I stored it securely as an environment variable (OPENWEATHER_API_KEY) alongside the AWS_BUCKET_NAME for my S3 bucket.</p><p>Finally, I installed the required dependencies listed in the requirements.txt file. These included:</p><ul><li>boto3==1.26.137</li><li>python-dotenv==1.0.0</li><li>requests==2.28.2</li></ul><p>I installed these dependencies using the command:</p><pre>pip install -r requirements.txt</pre><p><strong>STEP 2: Write Python Code to Fetch and Upload Data</strong></p><p>I wrote a Python script to:</p><ol><li>Fetch real-time weather data from an open API (e.g., OpenWeatherMap).</li><li>Parse the data and structure it as JSON.</li><li>Upload the JSON file to the S3 bucket.</li></ol><p>Here is a snippet of the code which can be found in the github repository:</p><p><a href="https://github.com/Preshydee/Real-time-weather-dashboard_project">https://github.com/Preshydee/Real-time-weather-dashboard_project</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rvj2jgrMmaAIa5sdkH6JHQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rvj2jgrMmaAIa5sdkH6JHQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*vLPm4EXNd88Eri0gw9jU_A.png" /></figure><p>Run the Python script using the command below</p><pre>python src/weather-dashboard.py</pre><h3>5. Results</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*SSKIa3DtZIBbivM4yzuloA.png" /></figure><ul><li>The data is structured in JSON format, ready for analysis or visualization.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yDRJWvghFXpL0K6rY0Z9lQ.png" /></figure><h3>Key Takeaways</h3><ol><li><strong>Automation</strong>: Automating tasks like fetching and storing weather data is powerful and efficient.</li><li><strong>AWS Familiarity</strong>: Hands-on experience with S3 boto3 deepened my understanding of cloud services.</li><li><strong>Error Handling</strong>: Building robust code to handle API errors is critical.</li></ol><h3>Explore the Project</h3><ul><li><strong>GitHub Repository</strong>: <a href="https://github.com/Preshydee/Real-time-weather-dashboard_project">https://github.com/Preshydee/Real-time-weather-dashboard_project</a></li><li><strong>Connect with Me</strong>: Share your thoughts on LinkedIn or check out more DevOps content on my Medium profile. <a href="https://www.linkedin.com/in/adekoya-precious/">https://www.linkedin.com/in/adekoya-precious/</a></li></ul><p>Let’s keep building and learning together!!!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a291417d8a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>