<?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 Favour Chinaza on Medium]]></title>
        <description><![CDATA[Stories by Favour Chinaza on Medium]]></description>
        <link>https://medium.com/@chinafav12?source=rss-6da8e62ffde8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*XVb5iSVwmyjEvs5qeg1lWA.jpeg</url>
            <title>Stories by Favour Chinaza on Medium</title>
            <link>https://medium.com/@chinafav12?source=rss-6da8e62ffde8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 15:04:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chinafav12/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[From Zero to Cloud Hero: How I Deployed a High-Availability Website on AWS]]></title>
            <link>https://medium.com/@chinafav12/from-zero-to-cloud-hero-how-i-deployed-a-high-availability-website-on-aws-33eb8359adbd?source=rss-6da8e62ffde8------2</link>
            <guid isPermaLink="false">https://medium.com/p/33eb8359adbd</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[ansible]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Favour Chinaza]]></dc:creator>
            <pubDate>Sun, 05 Oct 2025 21:40:49 GMT</pubDate>
            <atom:updated>2025-10-05T21:40:49.756Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>A beginner’s journey through EC2, Ansible automation, load balancing, and cloud architecture</strong></p><p>The Challenge That Changed Everything;</p><p>As funny as it may sound, I once knew absolutely nothing about AWS but curiosity has a way of turning confusion into confidence.I knew nothing about AWS. Today, I’m running a production-grade, load-balanced website across multiple cloud servers with automated deployment. This is that story.</p><p>What you’ll learn:</p><p>- Setting up EC2 instances without breaking the bank (Free Tier FTW!)</p><p>- Automating deployments like a DevOps engineer</p><p>- Load balancing traffic across multiple servers</p><p>- Comparing compute-based vs storage-based hosting</p><p>- Real-world cloud architecture decisions</p><p>Time investment:2–3 hours but expect to spend a bit more time if you run into any troubleshooting.</p><p>Cost: $0 (using AWS Free Tier)</p><p>Skill level gained: Intermediate Cloud Engineering</p><p>Let’s dive in. 🏊‍♂️</p><p>🎯 <strong>The Architecture: What We’re Building</strong></p><p>Imagine you’re opening a restaurant chain. You need:</p><p>1. Multiple locations (EC2 instances) to handle customer volume</p><p>2. A hostess (Load Balancer) to direct customers to the least busy location</p><p>3. An operations manual (Ansible) so every location operates identically</p><p>4. A food truck option (S3) for events where full restaurants aren’t needed</p><p>Here’s what the cloud architecture looks like:</p><p>┌─────────────┐</p><p>│ Internet │</p><p>└──────┬──────┘</p><p>│</p><p>┌──────────▼──────────┐</p><p>│ Application Load │</p><p>│ Balancer (ALB) │</p><p>└──────────┬──────────┘</p><p>│</p><p>┌──────────────┴──────────────┐</p><p>│ │</p><p>┌───────▼────────┐ ┌───────▼────────┐</p><p>│ EC2 Instance │ │ EC2 Instance │</p><p>│ (NGINX) │ │ (NGINX) │</p><p>│ 172.31.x.x │ │ 172.31.y.y │</p><p>└────────────────┘ └────────────────┘</p><p><strong>The magic:</strong> When you visit my website, the load balancer automatically routes you to the least busy server. Refresh the page, and you might get a different server. That’s high availability in action!</p><p>📚 <strong>Chapter 1: Launching My First EC2 Instances</strong></p><p>EC2 = Elastic Compute Cloud: Think of it as renting a computer in the cloud that runs 24/7.</p><p><strong>The Setup:</strong></p><p>I launched two Ubuntu servers (t2.micro instances — free tier eligible):</p><p>- WebServer-1: My first cloud server ever</p><p>- WebServer-2: For redundancy and load distribution</p><p>Key Decisions I Made</p><p>Why Ubuntu? It’s beginner-friendly, widely documented, and has excellent community support.</p><p>Why t2.micro? It’s free tier eligible and perfect for learning. Plus, it handles small web traffic beautifully.</p><p><strong>Security Configuration:</strong></p><p>- Created a key pair (my password to access servers)</p><p>- Configured security groups (firewall rules)</p><p>- Allowed HTTP traffic (port 80) from anywhere</p><p><strong>The “Aha!” Moment</strong></p><p>When I first SSHed into my EC2 instance, it hit me: i’m controlling a computer hundreds of miles away through nothing but text commands. This is the power of cloud computing.</p><p><strong>```bash</strong></p><p><strong>ssh -i my-key.pem ubuntu@ec2-xx-xxx-xxx-xx.compute.amazonaws.com</strong></p><p>I’m in! 🎉</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nbr16L3cz46w6CqvUlAD6Q.jpeg" /><figcaption>my EC2 instances running gracefully</figcaption></figure><p>🤖<strong> Chapter 2: Automation with Ansible (The Game Changer)</strong></p><p>Manually configuring two servers? Manageable.</p><p>Ten servers? Tedious.</p><p>One hundred servers? Looks Impossible but achievable</p><p>What Is Ansible?</p><p>Imagine having a magic recipe book. You write the recipe once, and it cooks the exact same dish perfectly every single time, whether you’re making it for 2 people or 200. That’s Ansible.</p><p>My Ansible Playbook:</p><p>I wrote a playbook (in YAML — a human-readable format) that:</p><p>1. Updates all packages on the server</p><p>2. Installs NGINX web server</p><p>3. Configures proper file permissions</p><p>4. Deploys my HTML file</p><p>5. Restarts the web server</p><p>Here’s what the magic looks like:</p><p><strong>```yaml</strong></p><p>— -</p><p><strong>- name: Deploy Website to EC2 Instances</strong></p><p><strong>hosts: web servers</strong></p><p><strong>become: yes</strong></p><p><strong>tasks:</strong></p><p><strong>- name: Update apt cache</strong></p><p><strong>apt:</strong></p><p><strong>update_cache: yes</strong></p><p><strong>- name: Install NGINX</strong></p><p><strong>apt:</strong></p><p><strong>name: nginx</strong></p><p><strong>state: present</strong></p><p><strong>- name: Deploy HTML file</strong></p><p><strong>copy:</strong></p><p><strong>src: ./index.html</strong></p><p><strong>dest: /var/www/html/index.html</strong></p><p><strong>owner: www-data</strong></p><p><strong>group: www-data</strong></p><p><strong>mode: ‘0644’</strong></p><p><strong>- name: Restart NGINX</strong></p><p><strong>systemd:</strong></p><p><strong>name: nginx</strong></p><p><strong>state: restarted</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*420kW3EagqI6RygvTJuPEQ.jpeg" /><figcaption>Ansible playbook code and successful execution</figcaption></figure><p><strong>The Results</strong></p><p>One command deployed my website to both servers simultaneously:</p><p><strong>```bash</strong></p><p><strong>ansible-playbook -i host-inventory playbook.yaml</strong></p><p><strong>```</strong></p><p>I created an inventory file and tested the connectivity with:</p><p><strong><em>ansible all -i host-inventory -m ping</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aop-Wein8_I-aHD9rpXrtA.jpeg" /></figure><p><strong>Mind Blown 🤯</strong></p><p>What would have taken 30 minutes of manual work took 47 seconds with automation.</p><p>⚖️<strong> Chapter 3: Load Balancing Like a Boss</strong></p><p>Having two servers is great, but how do visitors know which one to use? And what if one server gets overwhelmed while the other sits idle?</p><p>Enter the Application Load Balancer:</p><p>An ALB is like a smart traffic cop. It:</p><p>- Distributes incoming requests evenly across servers</p><p>- Monitors server health (removes unhealthy servers automatically)</p><p>- Provides a single entry point for users</p><p><strong>Setting It Up:</strong></p><p><strong>Step 1: Created a Target Group</strong></p><p>- Added both EC2 instances as targets</p><p>- Configured health checks (ALB pings servers every 30 seconds)</p><p><strong>Step 2: Created the Load Balancer</strong></p><p>- Selected “Application Load Balancer”</p><p>- Made it internet-facing</p><p>- Connected it to my target group</p><p>This should work right, Of course but in my case it said;</p><p>“This account cannot create an application load balancer. Contact support.”</p><p><strong>Step 3: The Magic Moment:</strong></p><p>Since I was on the Free Tier, I used a Classic Load Balancer. I connected both EC2 instances, opened port 80 for HTTP traffic, and tested it using the Load Balancers DNS name. Things didn’t go smoothly at first but after creating a new security group with the correct inbound rules, Voilà! Everything worked like magic.</p><p>Then, I accessed my ALB’s DNS name again and refreshed the page multiple times, i saw the IP address changing between my two servers. It worked! 🎊</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3zQaQxPLRwJSbdGIM6mDUw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EM1BchjfmJpA02fOg6JOCQ.jpeg" /><figcaption>Both instance traffic successfully distributed</figcaption></figure><p><strong>Real-World Impact:</strong></p><p><strong>This simple setup provides:</strong></p><p>- High availability: If one server fails, traffic routes to the other</p><p>- Better performance: Requests distributed evenly</p><p>- Scalability: Can easily add more servers to handle traffic spikes</p><p>In production, this architecture could handle thousands of concurrent users.</p><p><strong>🪣 Chapter 4: S3 Static Hosting — The Plot Twist</strong></p><p>After setting up this complex infrastructure, I discovered something surprising: For static websites, there’s a simpler way.</p><p><strong>S3 Static Website Hosting:</strong></p><p>Amazon S3 (Simple Storage Service) can host static websites directly from cloud storage. No servers, No maintenance, Just upload and go.</p><p>The Setup (Took 5 Minutes!)</p><p>1. Created an S3 bucket</p><p>2. Enabled static website hosting</p><p>3. Made it public with a bucket policy</p><p>4. Uploaded my HTML file</p><p>5. Got a website URL instantly</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xQaAVrwkspA40QyLcfg4KA.jpeg" /></figure><p>I ran into a 403 Forbidden error, so I updated the bucket policy to allow public read access. Once that was done, my static website went live and was accessible to everyone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BrzXwg4-bHaQ-qTFShsx6w.jpeg" /><figcaption>The bucket successfully running</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-eCqDLQh1mTzMf-MPp4KEQ.jpeg" /><figcaption>The bucket successfully created</figcaption></figure><p><strong>The Big Question: EC2 or S3?</strong></p><p><strong>This is where it gets interesting. Here’s what I learned:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-EpU4b4zydGllij4lyPYcA.jpeg" /></figure><p><strong>My Takeaway:</strong></p><p>Learning EC2, Ansible, and load balancing taught me how real web infrastructure works. These skills apply to:</p><p>- Enterprise applications</p><p>- Micro services architectures</p><p>- API backends</p><p>- Any serious production system</p><p>S3 is great for simple sites. But if you want to work in cloud engineering or DevOps, you need to understand compute infrastructure. This project gave me that foundation.</p><p><strong>🎨 Chapter 5: The Website Itself</strong></p><p>Let’s talk about what I actually deployed. I created a responsive HTML page that displays which server is handling your request.</p><p>The page features:</p><p>-A soft gradient background with a clean, minimal layout nothing complex, just pure HTML.</p><p>- At the top, it displayed “Welcome to Heartsy Instance”, a simple yet satisfying message that confirmed my setup was working. The best part? The entire page was automatically deployed by Ansible.</p><p><strong>The Cool Part: Meta-data Service</strong></p><p>The website displayed the server’s IP address, which was dynamically passed in through the Ansible template.</p><p>The IP address was inserted into the HTML using a Jinja2 variable ({{ ansible_default_ipv4.address }}) during deployment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CzE69o9sTRh4oSyiCRPx2w.jpeg" /></figure><p><strong>💡 Chapter 6: Lessons Learned (The Hard Way)</strong></p><p><strong>Challenge 1: The 403 Forbidden Error</strong></p><p><strong>Problem: </strong>The website showed “403 Forbidden” after deploying.</p><p><strong>Root cause:</strong> The security group wasn’t allowing HTTP traffic on port 80.</p><p><strong>Solution:</strong>Updated inbound rules to allow traffic from 0.0.0.0/0 (anywhere).</p><p><strong>Lesson:</strong> Cloud security is intentional. While a few services may work by default, most things require explicit permission; you only get what you allow.</p><p><strong>Challenge 2: </strong>S3 Bucket Policy Wouldn’t Save</p><p><strong>Problem:</strong>AWS kept rejecting my bucket policy.</p><p><strong>Root cause</strong>: “Block Public Access” was still enabled on the bucket.</p><p><strong>Solution</strong>:Disabled public access blocking first, then applied policy.</p><p><strong>Lesson</strong>: In AWS, multiple security layers must align, one restrictive rule can block access even if another allows it.</p><p><strong>Challenge 3</strong>: Ansible Connection Failures</p><p><strong>Problem</strong>: `ansible-playbook` couldn’t connect to EC2 instances.</p><p><strong>Root cause</strong>: Wrong file permissions on SSH key (too open).</p><p><strong>Solution:</strong></p><p><strong>```bash</strong></p><p><strong>chmod 400 ~/.ssh/my-key.pem</strong></p><p><strong>```</strong></p><p><strong>Lesson:</strong>Linux/Unix permissions matter for security. SSH keys must be protected with 400 (read-only by owner).</p><p><strong>Challenge 4</strong>: Understanding Public vs Private IPs</p><p><strong>Problem</strong>: Confused about which IP to use</p><p><strong>What I learned:</strong></p><p>- Private IPs (172.31.x.x): For internal AWS communication, always stays same</p><p>-Public IPs: For internet access, can change if instance stops/starts</p><p>- Elastic IPs: Static public IPs (cost money if not attached)</p><p>- Load Balancer DNS: Best for production (never changes)</p><p><strong>Lesson:</strong> In production, never rely on public IPs directly. Use DNS names or Elastic IPs.</p><p><strong>🎓 Chapter 7</strong>: Skills Gained</p><p>What This Project Taught Me</p><p><strong>Technical Skills:</strong></p><p>- ✅ AWS EC2 instance management</p><p>- ✅ Infrastructure as Code with Ansible</p><p>- ✅ Load balancer architecture</p><p>- ✅ NGINX web server configuration</p><p>- ✅ S3 bucket policies and static hosting</p><p>- ✅ Security group and firewall management</p><p>- ✅ SSH and remote server access</p><p>- ✅ Git version control</p><p><strong>Soft Skills:</strong></p><p>- 🧠 Problem-solving (debugging cloud issues)</p><p>- 📖 Documentation reading (AWS docs became my bible)</p><p>- 🔍 Research skills (StackOverflow, Reddit, Medium)</p><p>- 💪 Persistence (when things didn’t work first time)</p><p><strong>Career Impact</strong></p><p>Before this project: “I’ve heard of AWS.”</p><p>After this project: “I can architect, deploy, and maintain cloud infrastructure.”</p><p>This isn’t just a portfolio project — it’s proof I can work with production-grade cloud tools.</p><p><strong>🛠️ Try It Yourself: Complete Resource Guide</strong></p><p>Prerequisites</p><p>- AWS Free Tier account</p><p>- Basic command line knowledge</p><p>- Text editor (VS Code recommended)</p><p>- 2–3 hours of focused time</p><p>Complete Code &amp; Resources</p><p>GitHub Repository: <a href="https://heartsycloud97.github.io/AWS-website-deployment/">https://heartsycloud97.github.io/AWS-website-deployment/</a></p><p><strong>📚 Resources That Saved Me</strong></p><p><strong>Documentation:</strong></p><p>- [AWS EC2 User Guide](https://docs.aws.amazon.com/ec2/)</p><p>- [Ansible Documentation](https://docs.ansible.com/)</p><p>- [NGINX Documentation](https://nginx.org/en/docs/)</p><p><strong>Community:</strong></p><p>- AWS Free Tier FAQ</p><p>Tutorials That Helped:</p><p>- <a href="https://skillbuilder.aws.com/">https://Skillbuilder.aws.com</a></p><p>- FreeCodeCamp AWS videos</p><p>🔗 Project Link</p><p>- GitHub Repository: <a href="https://heartsycloud97.github.io/AWS-website-deployment/">https://heartsycloud97.github.io/AWS-website-deployment/</a></p><p>💬 <em>Let’s Connect!</em></p><p><em>Did this article help you? Found it useful? Have questions?</em></p><p><em>-Comment below👇🏻</em></p><p><em>Thanks for reading! Now go build something amazing in the cloud☁️</em></p><p>Tags: #AWS #CloudComputing #DevOps #Ansible #WebDevelopment #Tutorial #LearningInPublic #EC2 #LoadBalancing #InfrastructureAsCode</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33eb8359adbd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>