<?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"><channel><title><![CDATA[Kamlesh Cloud & DevOps]]></title><description><![CDATA[I’m documenting my journey into Cloud and DevOps by building real projects from scratch and sharing everything I learn along the way.
This blog is focused on ha]]></description><link>https://blog.kamleshcloud.com</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1593680282896/kNC7E8IR4.png</url><title>Kamlesh Cloud &amp; DevOps</title><link>https://blog.kamleshcloud.com</link></image><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 14:32:08 GMT</lastBuildDate><atom:link href="https://blog.kamleshcloud.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How I Deployed My First Website on AWS (S3 + CloudFront + Domain + HTTPS + WAF)]]></title><description><![CDATA[Introduction
For a long time, I kept watching tutorials on cloud and DevOps.
I understood bits and pieces — S3, CloudFront, DNS — but nothing really clicked.
So I decided to stop watching and actually]]></description><link>https://blog.kamleshcloud.com/how-i-deployed-my-first-website-on-aws-s3-cloudfront-domain-https-waf</link><guid isPermaLink="true">https://blog.kamleshcloud.com/how-i-deployed-my-first-website-on-aws-s3-cloudfront-domain-https-waf</guid><dc:creator><![CDATA[Kamlesh Dubale]]></dc:creator><pubDate>Sat, 11 Apr 2026 10:31:56 GMT</pubDate><content:encoded><![CDATA[<h2>Introduction</h2>
<p>For a long time, I kept watching tutorials on cloud and DevOps.</p>
<p>I understood bits and pieces — S3, CloudFront, DNS — but nothing really clicked.</p>
<p>So I decided to stop watching and actually build something.</p>
<p>This project started as a simple goal: "I just want to put a website on the internet using AWS."</p>
<p>What I didn’t expect was how much this one project would teach me about how the internet actually works behind the scenes.</p>
<p>By the end, I had my own live website:</p>
<p>👉 <a href="https://kamleshcloud.com">https://kamleshcloud.com</a></p>
<p>And more importantly, I finally understood what happens when someone opens a website.</p>
<h2>What is a static website?</h2>
<p>Before starting this project, I always thought a website needs a server running in the background.</p>
<p>But that’s not always true.</p>
<p>A static website is simply a collection of files like:</p>
<ul>
<li><p>index.html</p>
</li>
<li><p>style.css</p>
</li>
<li><p>script.js</p>
</li>
</ul>
<p>That’s it.</p>
<p>These files are already written and stored somewhere. When a user opens the website, the browser just downloads these files and displays the page.</p>
<p>There is no backend logic or database involved in this setup.</p>
<p>That was one of the first things that surprised me.</p>
<p>It made me realise that for many use cases like portfolios, landing pages, or simple blogs, you don’t actually need a full server setup.</p>
<p>You just need a place to store your files and a way to deliver them to users.</p>
<img src="https://cdn.hashnode.com/uploads/covers/69d24c9340c9cabf44d0c3dd/b673c63b-2924-497d-9a9a-63cd331dbdfd.png" alt="" style="display:block;margin:0 auto" />

<h2>Final Architecture</h2>
<p>Once everything was set up, my website followed this flow:</p>
<p>User → Route 53 → WAF → CloudFront → S3</p>
<p>At first, this looked very confusing to me.</p>
<p>But when I broke it down step by step, it started making sense:</p>
<ul>
<li><p>S3 is where my website files are stored</p>
</li>
<li><p>CloudFront is responsible for delivering those files</p>
</li>
<li><p>Route 53 connects my domain name to the website</p>
</li>
<li><p>WAF acts like a security layer in front</p>
</li>
<li><p>ACM helps enable HTTPS</p>
</li>
</ul>
<p>Instead of thinking of these as separate services, I started seeing them as parts of one system working together to serve a simple website.</p>
<h2>Step-by-Step: What I Actually Did</h2>
<h3>1. Built the website locally</h3>
<p>I started by creating a simple website on my local machine using VS Code.</p>
<p>At this stage, the website only worked on my laptop.</p>
<p>This made me realise something very basic but important:</p>
<p>A website is just a collection of files until it is hosted somewhere on the internet.</p>
<p>Until those files are uploaded to a platform like AWS, no one else can access them.</p>
<p>That was my starting point.</p>
<h3>2. Uploaded the files to S3</h3>
<p>The next step was to move my website from my laptop to the cloud.</p>
<p>For this, I used Amazon S3.</p>
<p>I created a bucket and uploaded my website files:</p>
<ul>
<li><p>index.html</p>
</li>
<li><p>style.css</p>
</li>
<li><p>script.js</p>
</li>
</ul>
<p>At this point, my files were finally stored in AWS.</p>
<p>But something interesting happened.</p>
<p>Even though the files were there, the website still wasn’t properly “live” yet.</p>
<p>That’s when I realised:</p>
<p>Uploading files is not the same as hosting a website.</p>
<p>You still need to tell AWS how to serve those files as a website.</p>
<h3>3. Enabled static website hosting</h3>
<p>This step is where things started to come together.</p>
<p>Inside S3, I enabled static website hosting and set:</p>
<p>👉 index.html as the default page</p>
<p>At first, I didn’t fully understand why this was needed.</p>
<p>But then it made sense.</p>
<p>When someone opens a website, they don’t type something like:</p>
<p>/index.html</p>
<p>They just open the main domain.</p>
<p>So AWS needs to know:</p>
<p>“What file should I show by default?”</p>
<p>That file is called the index document.</p>
<p>Once I enabled this, my website started working through the S3 endpoint.</p>
<p>This was the first time I saw my website actually live on the internet.</p>
<h3>4. Added CloudFront (this confused me at first)</h3>
<p>After getting the S3 version working, the next step was to add CloudFront.</p>
<p>This part was confusing in the beginning.</p>
<p>I kept thinking:</p>
<p>“If S3 is already hosting my website, why do I need CloudFront?”</p>
<p>But later, I understood it in a simple way:</p>
<ul>
<li><p>S3 = storage</p>
</li>
<li><p>CloudFront = delivery</p>
</li>
</ul>
<p>Instead of users directly accessing S3, they now access CloudFront.</p>
<p>So the flow becomes:</p>
<p>User → CloudFront → S3</p>
<p>CloudFront acts as the front layer that handles requests and delivers the website.</p>
<p>This is how most real-world setups work.</p>
<p>That’s when I started understanding that cloud architecture is about separating responsibilities.</p>
<h3>5. Understanding the root object</h3>
<p>This was one of the terms that confused me a lot at first.</p>
<p>In CloudFront, there is something called the default root object.</p>
<p>I set it to:</p>
<p>index.html</p>
<p>But what does that actually mean?</p>
<p>It simply means:</p>
<p>“When someone opens the root of the website, which file should be shown?”</p>
<p>Since users don’t type:</p>
<p>/index.html</p>
<p>we need to tell CloudFront what to load by default.</p>
<p>That’s exactly what the root object does.</p>
<p>Once I understood this, it stopped feeling like a complex term.</p>
<h3>6. Bought a custom domain</h3>
<p>After CloudFront was working, I wanted to make the website feel more real.</p>
<p>So I bought my own domain:</p>
<p>kamleshcloud.com</p>
<p>using Route 53.</p>
<p>This was a big step for me.</p>
<p>Instead of using a long AWS-generated URL, I now had something that actually looked like a real website.</p>
<p>I also realised that this domain is not just for this project.</p>
<p>I can use it in the future for:</p>
<ul>
<li><p>my portfolio</p>
</li>
<li><p>my blog</p>
</li>
<li><p>and even potential business ideas</p>
</li>
</ul>
<p>That made this project feel much more meaningful.</p>
<h3>7. Setting up HTTPS (this tested my patience)</h3>
<p>After setting up the domain, the next step was to make the website secure using HTTPS.</p>
<p>For that, I used AWS Certificate Manager (ACM).</p>
<p>I requested a certificate for my domain, and at first everything looked fine.</p>
<p>But then the status stayed stuck at:</p>
<p>👉 “Pending validation”</p>
<p>This was frustrating because I wasn’t sure what was missing.</p>
<p>After digging a bit, I understood that AWS needed proof that I actually owned the domain.</p>
<p>This is done using DNS validation.</p>
<p>Once I created the required records in Route 53, the certificate finally changed to:</p>
<p>👉 “Issued”</p>
<p>That moment felt really satisfying because now my website was secure and could be accessed using HTTPS.</p>
<h3>8. Connecting the domain (this is where it finally worked)</h3>
<p>Even after setting up the certificate, my domain still didn’t work at first.</p>
<p>When I tried opening it, I got:</p>
<p>👉 DNS_PROBE_FINISHED_NXDOMAIN</p>
<p>At that point, I realised something was still missing.</p>
<p>The domain was not properly connected to CloudFront yet.</p>
<p>To fix this, I created an alias record in Route 53 and pointed it to my CloudFront distribution.</p>
<p>After doing that, I had to wait a few minutes for DNS to propagate.</p>
<p>And then…</p>
<p>🔥 The website finally went LIVE</p>
<p>👉 <a href="https://kamleshcloud.com">https://kamleshcloud.com</a></p>
<p>That was honestly one of the best moments of this project.</p>
<h3>9. Adding WAF (security layer)</h3>
<p>The final step was adding a basic security layer using AWS WAF.</p>
<p>You can think of WAF like a security guard in front of your website.</p>
<p>Before any request reaches CloudFront, WAF checks it first.</p>
<p>So now the flow becomes:</p>
<p>User → Route 53 → WAF → CloudFront → S3</p>
<p>Even though this is a basic setup, it made the architecture feel more complete and closer to real-world systems.</p>
<h2>What I Learned</h2>
<p>This project taught me much more than I expected.</p>
<p>Some of the biggest lessons were:</p>
<ul>
<li><p>A website is just a collection of files</p>
</li>
<li><p>S3 stores the files, CloudFront delivers them</p>
</li>
<li><p>DNS is what connects everything</p>
</li>
<li><p>HTTPS requires validation, not just a button click</p>
</li>
<li><p>Cloud architecture is really about request flow</p>
</li>
</ul>
<p>Most importantly, I realised that things only start making sense when you actually build something.</p>
<h2>Problems I Faced</h2>
<p>This project was not smooth, and that’s what made it valuable.</p>
<p>Some of the issues I ran into:</p>
<ul>
<li><p>Certificate stuck on “Pending validation”</p>
</li>
<li><p>Domain not working (NXDOMAIN error)</p>
</li>
<li><p>Confusion around CloudFront concepts</p>
</li>
<li><p>Understanding root object and behavior</p>
</li>
</ul>
<p>But solving these problems is what made everything click.</p>
<h2>Final Result</h2>
<p>Here is my live website:</p>
<p>👉 <a href="https://kamleshcloud.com">https://kamleshcloud.com</a></p>
<p>And the GitHub repository:</p>
<p>👉 <a href="https://github.com/KamleshDevopsAndCloud">https://github.com/KamleshDevopsAndCloud</a></p>
<h2>Final Thought</h2>
<p>If you are starting your cloud journey, my advice is simple:</p>
<p>Don’t wait until you feel ready.</p>
<p>Just build something.</p>
<p>Break things. Fix them. Try again.</p>
<p>That’s when everything starts making sense.</p>
]]></content:encoded></item></channel></rss>