<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Loïc Rutabana</title>
    <description>The latest articles on DEV Community by Loïc Rutabana (@zuba).</description>
    <link>https://dev.to/zuba</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1516802%2Fb58eac0b-2ff0-4ca4-acb8-a7131a1e4121.jpg</url>
      <title>DEV Community: Loïc Rutabana</title>
      <link>https://dev.to/zuba</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zuba"/>
    <language>en</language>
    <item>
      <title>Project Nairobi Update: Progress, Pitfalls, and Lessons Learned</title>
      <dc:creator>Loïc Rutabana</dc:creator>
      <pubDate>Wed, 19 Feb 2025 20:19:51 +0000</pubDate>
      <link>https://dev.to/zuba/project-nairobi-update-progress-pitfalls-and-lessons-learned-4o5d</link>
      <guid>https://dev.to/zuba/project-nairobi-update-progress-pitfalls-and-lessons-learned-4o5d</guid>
      <description>&lt;p&gt;In my previous post, I introduced Project Nairobi, a distributed analytics platform I’m building on AWS to handle IoT data at scale. This time, I want to dive into the progress I’ve made so far—along with the headaches and roadblocks that came along for the ride.&lt;/p&gt;

&lt;h1&gt;
  
  
  What’s New: Our Recent Wins
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Auto Scaling Group for EC2&lt;/strong&gt;&lt;br&gt;
A major focus has been setting up an Auto Scaling Group (ASG) for EC2 instances. Having ASG in place lets me spin up or shut down instances as needed without manual intervention. This means I can simulate any number of IoT devices just by adjusting the capacity of the group.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;IoT Device Simulation on Boot&lt;/strong&gt;🤖&lt;br&gt;
I’ve also configured these EC2 instances to run Python scripts for simulating IoT devices on boot. The idea is that, as soon as an instance spins up, it automatically starts sending data to the rest of the pipeline. Getting that “plug-and-play” behavior has been really satisfying to see in action.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🌊&lt;strong&gt;Data Flow&lt;/strong&gt;: EC2 → Kinesis → Lambda → S3 &amp;amp; DynamoDB&lt;br&gt;
A functional data flow was an essential next step. With the pipeline in place:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;EC2 runs the Python scripts that generate or collect telemetry.&lt;br&gt;
The data streams into Amazon Kinesis in near real-time.&lt;br&gt;
A Lambda function processes and transforms this data.&lt;br&gt;
Finally, it lands in a DynamoDB Table for longer-term storage and analytics and a copy of the unprocessed data is sent to an S3 bucket for post-analysis. I haven't set up the DynamoDB table yet, so all data is sent to the S3 Bucket.&lt;br&gt;
It’s a clean flow that captures the essence of a scalable IoT pipeline.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzl9hubjq2wnoutpu1euy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzl9hubjq2wnoutpu1euy.png" alt="A diagram describing the above workflow" width="800" height="311"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;🔄️&lt;strong&gt;CI/CD Integration&lt;/strong&gt;
Another accomplishment has been setting up a CI/CD pipeline so that pushing new code automatically triggers updates across all instances. Specifically, whenever there’s a pull request to the main branch:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The pipeline reboots all IoT devices (the EC2 instances).&lt;br&gt;
It runs updated code to ensure everything remains consistent and in sync.&lt;br&gt;
Having this quick, reproducible deployment cycle makes it easy to iterate on features without worrying about manual redeployments.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;✅&lt;strong&gt;Polished and Tested Python Code&lt;/strong&gt;
Finally, I spent a good chunk of time refactoring and cleaning up the Python code to ensure that each piece is thoroughly tested. This not only helped improve reliability but also made the codebase much easier to reason about and maintain over time.&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  🧑‍🏫Challenges and Lessons Learned
&lt;/h1&gt;

&lt;h4&gt;
  
  
  Of course, no progress comes without a few hiccups.
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;CI/CD Pipeline IAM Role Issues&lt;/strong&gt;&lt;br&gt;
One of the biggest hurdles was GitHub Actions not being able to assume the necessary IAM role for making requests to my API Gateway. I lost a fair bit of time troubleshooting, and it turned out the role trust policies and permissions weren’t aligned properly. Lesson learned: always verify which entity (GitHub Actions in this case) needs to assume which role, and ensure your trust relationships are explicitly set.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Code Errors on EC2 Instances&lt;/strong&gt;&lt;br&gt;
Despite the automation, running code on the EC2 instances has been an ongoing game of whack-a-mole. Each time I solve one error, another pops up—from missing dependencies to library version conflicts. My takeaway here is to keep an eye on how the base AMI and Python environment get provisioned. Small changes can introduce big problems.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Refactor Friction and Module Errors&lt;/strong&gt;&lt;br&gt;
After making the Python code more modular and test-friendly, I ran into a series of module-related errors. Some modules weren’t being imported correctly, or path issues surfaced only in the production environment. It was a reminder that thorough testing has to include realistic deployment scenarios as well—local tests aren’t always enough.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  🤔Next Steps
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Fix EC2 Python Script Issues:
&lt;/h4&gt;

&lt;p&gt;The first priority is to stabilize the environment on each EC2 instance. I’ll refine the provisioning scripts, ensure dependencies are properly installed, and tackle the recurring module path errors once and for all.&lt;/p&gt;

&lt;h4&gt;
  
  
  Experiment with Different Instance Types:
&lt;/h4&gt;

&lt;p&gt;Once the scripts run consistently, I plan to tinker with various EC2 instance types (e.g., t3.medium, m5.large) to strike a good balance between cost and performance. The goal is to simulate loads of varying magnitudes while keeping the budget in check.&lt;/p&gt;

&lt;h4&gt;
  
  
  Set Up a DynamoDB Table:
&lt;/h4&gt;

&lt;p&gt;Storing stateful data—like metadata about the simulated IoT devices—could be hugely beneficial. I’ll spin up a DynamoDB table to maintain device configurations, health stats, or anything else that’ll help manage and analyze this distributed system more effectively.&lt;/p&gt;

&lt;h4&gt;
  
  
  Work on Analysis:
&lt;/h4&gt;

&lt;p&gt;With the core pipeline (EC2 → Kinesis → Lambda → S3) in place, it’s time to shift focus to actual analytics. By integrating tools like Athena, QuickSight, or even custom ML pipelines, I can start transforming the raw stream data into actionable insights.&lt;/p&gt;

&lt;p&gt;I’m excited for what’s next—especially now that I’ll have a more stable, scalable, and analytics-friendly backbone for Project Nairobi. Stay tuned for more updates as I tackle these to-dos and continue refining this platform into an end-to-end, production-grade solution!&lt;/p&gt;

&lt;p&gt;Have any tips, suggestions, or want to share your own experiences wrestling with IAM roles and pipelines? Feel free to drop a comment. I’m always keen to hear how others navigate these complexities. And if you’re new here, be sure to check out my previous posts to see how Project Nairobi got started.&lt;/p&gt;

&lt;p&gt;Stay tuned for more progress updates as I continue to refine this platform into a smoothly running, production-grade analytics engine!&lt;/p&gt;

&lt;p&gt;😁Thanks for reading, and see you in the next update.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>python</category>
      <category>githubactions</category>
      <category>distributedsystems</category>
    </item>
    <item>
      <title>Project Nairobi: Building a Distributed Analytics Platform on AWS</title>
      <dc:creator>Loïc Rutabana</dc:creator>
      <pubDate>Wed, 05 Feb 2025 20:03:05 +0000</pubDate>
      <link>https://dev.to/zuba/project-nairobi-building-a-distributed-analytics-platform-on-aws-4abo</link>
      <guid>https://dev.to/zuba/project-nairobi-building-a-distributed-analytics-platform-on-aws-4abo</guid>
      <description>&lt;h2&gt;
  
  
  Project Nairobi
&lt;/h2&gt;

&lt;p&gt;Have you ever wanted to take your side projects to the next level, having them process thousands of data points per second? Everything from drone sensor readings to phone pings and camera footage. Welcome to &lt;strong&gt;Project Nairobi&lt;/strong&gt;, where I'll be building a real-time distributed Analytics Platform on AWS, simulating a sprawling urban area of Nairobi, Kenya.&lt;/p&gt;

&lt;p&gt;I’ve been interested in distributed systems for a while now. Recently, I realized imposter syndrome never truly goes away—you just learn to push through it. Letting my passion dispel my fears, I decided to dive in headfirst. &lt;/p&gt;

&lt;p&gt;Another reason behind this project is that it allows me to visualize how a developing Africa could look as I gradually build out the digital infrastructure of a bustling city—my own “shameless fantasy.” I was born and raised in Rwanda, where I’ve seen firsthand how quickly a country can transform. Through Project Nairobi, I’m combining my passion for technology with the hope that these ideas might someday help shape a more connected, data-driven future—not just for Kenya, but for all of East Africa. It’s a small start, but it’s also a step toward dreaming bigger about the role I can play in my home region’s continued growth and innovation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Goals &amp;amp; Learning Objectives:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Understand how to scale a distributed system&lt;/li&gt;
&lt;li&gt;Develop a greater understanding of AWS services and how to coordinate them&lt;/li&gt;
&lt;li&gt;Implementing fail saves on several levels&lt;/li&gt;
&lt;li&gt;Share mistakes and lessons learned&lt;/li&gt;
&lt;li&gt;Make some friends with shared interests&lt;/li&gt;
&lt;li&gt;Become the 10x developer I was BORN to be!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'm writing this blog to have some accountability to follow through with this project and not let it overwhelm me, and also to hold me to high standards for implementation since I'll be sharing my approach publicly, beginning with my architecture diagram below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxty8rkwy4ci13f2jopk8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxty8rkwy4ci13f2jopk8.png" alt="Architecture Diagram for the final product&lt;br&gt;
" width="800" height="549"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Next Steps
&lt;/h3&gt;

&lt;p&gt;Next, I'll make a minimum viable product, beginning by setting up a simple EC2 instance to generate IoT-like data to feed into AWS Kinesis. Then, we'll process that data on Lambda and store it in DynamoDB. I'll try my best to keep these coming on a weekly basis to keep track of my progress. I hope you'll enjoy this as much as I plan to!&lt;/p&gt;

</description>
      <category>aws</category>
      <category>distributedsystems</category>
      <category>sideprojects</category>
    </item>
  </channel>
</rss>
