<?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 Raji Mukhtar on Medium]]></title>
        <description><![CDATA[Stories by Raji Mukhtar on Medium]]></description>
        <link>https://medium.com/@rajimukhtar1?source=rss-485750658fd2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*TYsR_8Px2AQRTJwV</url>
            <title>Stories by Raji Mukhtar on Medium</title>
            <link>https://medium.com/@rajimukhtar1?source=rss-485750658fd2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 01:20:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rajimukhtar1/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[Secure Web Application Deployment on AWS using Ansible and Load Balancing]]></title>
            <link>https://medium.com/@rajimukhtar1/secure-web-application-deployment-on-aws-using-ansible-and-load-balancing-7d082ec16ab0?source=rss-485750658fd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d082ec16ab0</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[web-applications]]></category>
            <category><![CDATA[ansible-playbook]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Raji Mukhtar]]></dc:creator>
            <pubDate>Thu, 05 Mar 2026 17:39:41 GMT</pubDate>
            <atom:updated>2026-03-05T17:39:41.732Z</atom:updated>
            <content:encoded><![CDATA[<p>When I started this project as a Junior Cloud Engineer, I didn’t just want to “host a website.” I wanted to build a production-grade environment that followed the <strong>Principle of Least Privilege</strong>. That meant making my web servers completely invisible to the public internet while ensuring they remained 100% available to users.</p><p>In the modern cloud landscape, “security by obscurity” isn’t enough. As a Junior Cloud Engineer, I recently tackled a project that serves as the blueprint for enterprise-grade deployments: a secure, load-balanced web application that follows a <strong>Zero-Trust</strong> philosophy.</p><p>The goal was simple yet rigorous: deploy a web cluster where the servers are invisible to the public internet, management is entirely automated, and the architecture is resilient enough to handle hardware failure.</p><h3>The Philosophy: Why This Architecture?</h3><ol><li><strong>The Bastion Host:</strong> In this setup, our web servers live in <strong>Private Subnets</strong>. They have no public IPs. To manage them, I deployed a Bastion Host in a Public Subnet. By restricting SSH access to <em>only</em> my specific local IP, I created a single, hardened “eye of the needle” for all administrative traffic.</li><li><strong>Infrastructure as Code (Ansible):</strong> Manual configuration is a scalability killer. I used Ansible to ensure that every server — whether it’s the first or the hundredth — is configured identically.</li><li><strong>The Load Balancer (The Traffic Cop):</strong> By using an AWS Load Balancer, I ensured that users never talk to my servers directly. They talk to the Load Balancer, which then intelligently distributes traffic, providing a seamless failover mechanism.</li></ol><h3><strong>Phase 1: Designing the Network Backbone</strong></h3><p>I bypassed the “VPC Wizards” to manually wire the network. This was a deliberate choice to understand exactly how traffic flows.</p><ul><li><strong>VPC &amp; Subnets:</strong> I carved out a /16 CIDR block and segmented it into Public and Private subnets.</li></ul><figure><img alt="Deploying a VPC" src="https://cdn-images-1.medium.com/max/1024/1*2T-VbTXBrXvdQE3fc2f4Gg.png" /><figcaption>Deploying a VPC</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*56EOWYFs4Q59yNkSthoQkg.png" /><figcaption>Creating the Subnets(Public and Private)</figcaption></figure><ul><li><strong>The Secure Bridge:</strong> I deployed a <strong>NAT Gateway</strong> in the public subnet. This is the “secret sauce” that allows our private servers to reach out for NGINX updates while remaining protected from inbound internet probes.</li><li><strong>Routing Logic:</strong> I configured separate Route Tables. The Public Table points to an <strong>Internet Gateway (IGW)</strong>, while the Private Table is strictly routed through the <strong>NAT Gateway</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lM3TON1AllXLY8VxpZhGWw.png" /><figcaption>Creating a route table(Internet Gateway and NAT Gateway)</figcaption></figure><blockquote><strong><em>Pro-Tip:</em></strong><em> NAT Gateways are billed hourly ($0.045/hr). For lab environments, always tear these down the moment your deployment is verified!</em></blockquote><h3>Phase 2: Building the “Chain of Trust” (Security Groups)</h3><p>Instead of using fragile static IPs for security rules, I used <strong>Security Group Referencing</strong>.</p><ul><li><strong>The Perimeter:</strong> The ALB Security Group accepts HTTP traffic from the world (0.0.0.0/0).</li><li><strong>The Vault:</strong> The Web Server Security Group <em>only</em> accepts traffic if it originates from the <strong>ALB’s Security Group ID</strong> or the <strong>Bastion’s Security Group ID</strong>. If a request doesn’t come from those specific sources, it is dropped at the gate.</li></ul><h3>Phase 3: The “Pivot” — Dealing with Real-World Hurdles</h3><p>No project goes perfectly. While I initially aimed for an Application Load Balancer (ALB), a temporary account restriction forced me to pivot to a <strong>Classic Load Balancer (CLB)</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GKlCwod8eTFQ0qgGSUWUSQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XZH6ef1VV0r-9tNIPxU1Rw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TE9jD_WNBMkSXFIRldX9uA.png" /><figcaption>How the CLB(Classic Load Balancer) is deployed</figcaption></figure><p>This turned into a massive learning opportunity. I had to manually configure high availability across multiple Availability Zones and manage listeners at both the Transport (TCP) and Application (HTTP) layers. It reinforced a vital cloud lesson: <strong>Adaptability is as important as technical skill.</strong></p><h3>Phase 4: Automation via the “SSH Tunnel”</h3><p>To make Ansible work with private instances, I implemented the <strong>ProxyJump</strong> “Magic Line” in my inventory.ini.</p><p><strong>The Challenge:</strong> I hit a ModuleNotFoundError because my local Ansible version struggled with the newer Python 3.12 environment on the Ubuntu targets. <strong>The Fix:</strong> I explicitly defined ansible_python_interpreter=/usr/bin/python3 in my group variables. This simple line bridged the gap between my automation scripts and the remote OS.</p><p>I used <strong>Jinja2 templates</strong> to deploy a dynamic index.html. By injecting variables like {{ ansible_hostname }}, I could visually verify that the Load Balancer was successfully toggling between different private servers.</p><h3>Phase 5: Verification — “Green Means Go”</h3><p>After setting my .pem key permissions (chmod 400), I ran the final playbook. Seeing the &quot;changed=1&quot; status in green was the ultimate validation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BIl8WMe3kLoRym8W0iTPwg.jpeg" /><figcaption>The playbook.yaml look alike</figcaption></figure><p>When I pasted the Load Balancer’s DNS name into my browser, I saw my “About Me” page. Every refresh showed a different Private IP — proving that the traffic was being distributed across my “hidden” cluster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ixM_rkGLbOlkl5td5O2IsQ.jpeg" /><figcaption>Image of the web server accessed using the CLB DNS URL</figcaption></figure><h3>Conclusion</h3><p>Building this from scratch — manually “connecting the dots” between Route Tables, NAT Gateways, and Ansible Playbooks — gave me a clarity that no automated wizard could provide. I’ve built a fortress that is secure by default, automated by choice, and ready for the demands of a growing company.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d082ec16ab0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Secure Web Application Deployment on AWS using Ansible and Load Balancing]]></title>
            <link>https://medium.com/@rajimukhtar1/secure-web-application-deployment-on-aws-using-ansible-and-load-balancing-8050a0001b63?source=rss-485750658fd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/8050a0001b63</guid>
            <category><![CDATA[aws-vpc]]></category>
            <category><![CDATA[aws-ec2]]></category>
            <category><![CDATA[bastion-host]]></category>
            <category><![CDATA[ansible-playbook]]></category>
            <category><![CDATA[ssh]]></category>
            <dc:creator><![CDATA[Raji Mukhtar]]></dc:creator>
            <pubDate>Sat, 21 Feb 2026 23:31:48 GMT</pubDate>
            <atom:updated>2026-02-21T23:33:04.454Z</atom:updated>
            <content:encoded><![CDATA[<p>Pending…pending…pending…pending…pending…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8050a0001b63" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>