<?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: BOOPESH N</title>
    <description>The latest articles on DEV Community by BOOPESH N (@boopesh_n_21).</description>
    <link>https://dev.to/boopesh_n_21</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%2F4125502%2F0be185df-7e9a-4b45-a6ed-894423711db6.png</url>
      <title>DEV Community: BOOPESH N</title>
      <link>https://dev.to/boopesh_n_21</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/boopesh_n_21"/>
    <language>en</language>
    <item>
      <title>Day-1:Cloud Workshop</title>
      <dc:creator>BOOPESH N</dc:creator>
      <pubDate>Tue, 15 Sep 2026 07:01:43 +0000</pubDate>
      <link>https://dev.to/boopesh_n_21/day-1cloud-workshop-1faa</link>
      <guid>https://dev.to/boopesh_n_21/day-1cloud-workshop-1faa</guid>
      <description>&lt;p&gt;&lt;strong&gt;I Built and Deployed My First React Portfolio on AWS S3 + CloudFront — And Broke It Along the Way&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As a Computer Science student, I’ve been trying to move away from just &lt;strong&gt;writing code by following tutorials&lt;/strong&gt; and actually understand how things work by building and deploying projects.&lt;/p&gt;

&lt;p&gt;One of the things I wanted to build was a simple personal portfolio.&lt;/p&gt;

&lt;p&gt;It sounded easy:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Build a React portfolio → upload it to AWS → get a public URL.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It wasn't quite that simple.&lt;/p&gt;

&lt;p&gt;I ran into permissions issues, S3 configuration problems, CloudFront errors, and eventually discovered that I had accidentally configured CloudFront to look for:&lt;br&gt;
index.html/index.html&lt;/p&gt;

&lt;p&gt;This is the story of how I built it, broke it, debugged it, and finally understood what was actually happening.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Starting With a Simple HTML Portfolio&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I initially created my portfolio using a single:&lt;/p&gt;

&lt;p&gt;index.html&lt;/p&gt;

&lt;p&gt;I kept the design intentionally simple.&lt;/p&gt;

&lt;p&gt;The portfolio contained:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;About Me&lt;/li&gt;
&lt;li&gt;Technical Skills&lt;/li&gt;
&lt;li&gt;Projects&lt;/li&gt;
&lt;li&gt;Education&lt;/li&gt;
&lt;li&gt;Areas of Interest&lt;/li&gt;
&lt;li&gt;Contact&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Some of the projects and areas I included were:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CLOTE — self-hosted cloud file management&lt;/li&gt;
&lt;li&gt;Automated Data Intelligence System&lt;/li&gt;
&lt;li&gt;Graph Algorithm Visualizer&lt;/li&gt;
&lt;li&gt;ML Ad-Click Prediction&lt;/li&gt;
&lt;li&gt;City-Specific Smart Traffic System&lt;/li&gt;
&lt;li&gt;Knowledge-Based Systems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At this point, everything worked locally.&lt;/p&gt;

&lt;p&gt;I could simply open the HTML file in my browser and see the portfolio.&lt;/p&gt;

&lt;p&gt;But then I wanted to actually &lt;strong&gt;deploy it&lt;/strong&gt;.&lt;/p&gt;


&lt;h1&gt;
  
  
  2. Moving to AWS S3
&lt;/h1&gt;

&lt;p&gt;I decided to use Amazon S3 for hosting.&lt;/p&gt;

&lt;p&gt;I created an S3 bucket and uploaded my portfolio.&lt;/p&gt;

&lt;p&gt;The object looked like:&lt;/p&gt;

&lt;p&gt;s3://boopesh-09-150926/index.html&lt;/p&gt;

&lt;p&gt;My first assumption was:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"The file is uploaded, so anyone should be able to open it."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That assumption was wrong.&lt;/p&gt;

&lt;p&gt;When I tried accessing the website, I received:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;Error&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;Code&amp;gt;&lt;/span&gt;AccessDenied&lt;span class="nt"&gt;&amp;lt;/Code&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;Message&amp;gt;&lt;/span&gt;Access Denied&lt;span class="nt"&gt;&amp;lt;/Message&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/Error&amp;gt;&lt;/span&gt;

# 3. First Struggle — S3 AccessDenied

This was my first real AWS deployment problem.

The HTML itself wasn't the issue.

The problem was with **S3 permissions and website access configuration**.

I had to understand the relationship between:

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
text&lt;br&gt;
S3 Bucket&lt;br&gt;
    ↓&lt;br&gt;
Object&lt;br&gt;
    ↓&lt;br&gt;
Permissions&lt;br&gt;
    ↓&lt;br&gt;
Static Website Hosting&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
I configured static website hosting and worked through the public-access configuration and bucket policy.

The important part of the bucket policy was allowing public `GetObject` access:

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
json&lt;br&gt;
{&lt;br&gt;
  "Version": "2012-10-17",&lt;br&gt;
  "Statement": [&lt;br&gt;
    {&lt;br&gt;
      "Sid": "PublicReadGetObject",&lt;br&gt;
      "Effect": "Allow",&lt;br&gt;
      "Principal": "&lt;em&gt;",&lt;br&gt;
      "Action": "s3:GetObject",&lt;br&gt;
      "Resource": "arn:aws:s3:::portfolio-nith/&lt;/em&gt;"&lt;br&gt;
    }&lt;br&gt;
  ]&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;But then I ran into another issue.&lt;/p&gt;


&lt;h1&gt;
  
  
  4. My Bucket Name Wasn't What I Thought
&lt;/h1&gt;

&lt;p&gt;At one point I was working with:&lt;/p&gt;

&lt;p&gt;nithish-bucket-portfolio&lt;/p&gt;

&lt;p&gt;But when I looked at my AWS console, the actual bucket I was configuring was:&lt;/p&gt;

&lt;p&gt;my-portfolio&lt;/p&gt;

&lt;p&gt;That caused confusion while creating the bucket policy.&lt;/p&gt;

&lt;p&gt;AWS was telling me:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Policy has invalid resource
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The reason was simple.&lt;/p&gt;

&lt;p&gt;The policy resource has to reference the &lt;strong&gt;actual bucket name&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;arn:aws:s3:::portfolio/*

instead of:

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
text&lt;br&gt;
arn:aws:s3:::boopesh-09-150926/*&lt;/p&gt;

&lt;p&gt;That was a small mistake, but it taught me something important:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Don't blindly copy AWS configuration. Understand what resource you're actually configuring.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h1&gt;
  
  
  5. Then I Wanted to Use React
&lt;/h1&gt;

&lt;p&gt;Once I had the basic portfolio working, I decided to convert it into a React application.&lt;/p&gt;

&lt;p&gt;Instead of one large HTML file, I moved to a React + Vite structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;portfolio/
│
├── index.html
├── package.json
│
└── src/
    ├── main.jsx
    └── style.css
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I used React to render the portfolio sections and JavaScript arrays for things like skills and projects.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;skills&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Python&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;C / C++&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Data Structures &amp;amp; Algorithms&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Machine Learning&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;TensorFlow&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;NumPy&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Pandas&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Docker&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And projects were represented as data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;projects&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;CLOTE&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;tech&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Private Cloud • File Management&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This was my first step toward understanding how a real frontend project is structured rather than putting everything into one HTML file.&lt;/p&gt;




&lt;h1&gt;
  
  
  6. Understanding &lt;code&gt;npm run build&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;This was another important part.&lt;/p&gt;

&lt;p&gt;I initially thought:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Since it's React, I need a server running on AWS."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Not necessarily.&lt;/p&gt;

&lt;p&gt;React can be built into static files.&lt;/p&gt;

&lt;p&gt;I ran:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Vite generated:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dist/
│
├── index.html
└── assets/
    ├── ...
    └── ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This was a major realization for me.&lt;/p&gt;

&lt;p&gt;The browser doesn't need my React source code or Node.js running on S3.&lt;/p&gt;

&lt;p&gt;The production build becomes static assets that can be served by a web server.&lt;/p&gt;

&lt;p&gt;So the deployment becomes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;React source
     ↓
npm run build
     ↓
dist/
     ↓
AWS S3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  7. Adding CloudFront
&lt;/h1&gt;

&lt;p&gt;Then I wanted to put CloudFront in front of S3.&lt;/p&gt;

&lt;p&gt;The architecture became:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                    ┌──────────────┐
                    │    Browser   │
                    └──────┬───────┘
                           │
                           ▼
                    ┌──────────────┐
                    │  CloudFront  │
                    └──────┬───────┘
                           │
                           ▼
                    ┌──────────────┐
                    │      S3      │
                    │   index.html │
                    │    assets/   │
                    └──────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This was the point where things got interesting.&lt;/p&gt;




&lt;h1&gt;
  
  
  8. The CloudFront 404 Error
&lt;/h1&gt;

&lt;p&gt;Instead of my portfolio, CloudFront returned:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;404 Not Found

Code: NoSuchKey

Message: The specified key does not exist.

Key: index.html/index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At first I had no idea why AWS was asking for:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;index.html/index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;My S3 bucket clearly contained:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;not:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;index.html/index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So I started looking at the CloudFront configuration.&lt;/p&gt;




&lt;h1&gt;
  
  
  9. Finding the Actual Problem
&lt;/h1&gt;

&lt;p&gt;I checked the CloudFront origin configuration.&lt;/p&gt;

&lt;p&gt;And there it was.&lt;/p&gt;

&lt;p&gt;My origin looked like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Origin type: S3 static website
Origin path: /index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That was the mistake.&lt;/p&gt;

&lt;p&gt;CloudFront already knew that the default root object was:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And I had also told the origin to use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So CloudFront effectively ended up requesting:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/index.html/index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;S3 obviously couldn't find that object.&lt;/p&gt;

&lt;p&gt;The error suddenly made sense.&lt;/p&gt;




&lt;h1&gt;
  
  
  10. The Fix
&lt;/h1&gt;

&lt;p&gt;I changed the CloudFront origin path from:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(empty)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And kept the CloudFront default root object as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So the configuration became conceptually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CloudFront

Default root object:
index.html

Origin:
portfolio-nith S3 website endpoint

Origin path:
(empty)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the request flow made sense:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/
 ↓
CloudFront
 ↓
index.html
 ↓
S3
 ↓
portfolio
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;instead of:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/
 ↓
CloudFront
 ↓
index.html
 ↓
/index.html
 ↓
index.html/index.html ❌
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  11. Why I Had to Invalidate CloudFront
&lt;/h1&gt;

&lt;p&gt;Even after fixing the configuration, CloudFront can still have cached responses.&lt;/p&gt;

&lt;p&gt;So I created a CloudFront invalidation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/*
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This tells CloudFront to remove the cached objects so that the next request can fetch the updated content.&lt;/p&gt;




&lt;h1&gt;
  
  
  12. What I Actually Learned
&lt;/h1&gt;

&lt;p&gt;The biggest thing I learned from this wasn't React.&lt;/p&gt;

&lt;p&gt;It wasn't S3.&lt;/p&gt;

&lt;p&gt;It wasn't even CloudFront.&lt;/p&gt;

&lt;p&gt;It was &lt;strong&gt;debugging&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Before this, when something didn't work, my first instinct was often:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"The code must be wrong."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But this project showed me that problems can exist at completely different layers.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Frontend
   ↓
React
   ↓
Build
   ↓
Static files
   ↓
S3
   ↓
Permissions
   ↓
CloudFront
   ↓
Caching
   ↓
Browser
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A website can have perfectly valid React code and still return a 404 because the &lt;strong&gt;infrastructure configuration is wrong&lt;/strong&gt;.&lt;/p&gt;




&lt;h1&gt;
  
  
  13. My Struggles
&lt;/h1&gt;

&lt;p&gt;These were some of the problems I faced:&lt;/p&gt;

&lt;h3&gt;
  
  
  S3
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AccessDenied
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I had to understand bucket permissions and public access.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bucket policy
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Policy has invalid resource
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I was referencing the wrong bucket name.&lt;/p&gt;

&lt;h3&gt;
  
  
  CloudFront
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NoSuchKey
Key: index.html/index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I had incorrectly configured the origin path.&lt;/p&gt;

&lt;h3&gt;
  
  
  Caching
&lt;/h3&gt;

&lt;p&gt;Even after fixing the configuration, CloudFront could still serve an old cached response.&lt;/p&gt;




&lt;h1&gt;
  
  
  14. What I Would Do Differently Next Time
&lt;/h1&gt;

&lt;p&gt;If I were starting this deployment again, my process would be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Build React application
        ↓
2. Test locally
        ↓
3. npm run build
        ↓
4. Check dist/
        ↓
5. Upload dist contents to S3
        ↓
6. Configure S3
        ↓
7. Configure CloudFront
        ↓
8. Test CloudFront
        ↓
9. Check logs/errors if something fails
        ↓
10. Invalidate cache when required
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And most importantly:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I would change one configuration at a time and test after each change.&lt;/strong&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  15. Final Architecture
&lt;/h1&gt;

&lt;p&gt;The final concept I learned is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                 ┌───────────────────┐
                 │       User        │
                 └─────────┬─────────┘
                           │
                           ▼
                 ┌───────────────────┐
                 │     CloudFront    │
                 │       CDN         │
                 └─────────┬─────────┘
                           │
                           ▼
                 ┌───────────────────┐
                 │    S3 Bucket      │
                 │                   │
                 │   index.html      │
                 │   assets/         │
                 └───────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;My React application is built into static files and served through AWS infrastructure.&lt;/p&gt;




&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;This was a relatively small project, but it gave me something more valuable than just a portfolio.&lt;/p&gt;

&lt;p&gt;It gave me experience with the uncomfortable part of development:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;things not working.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I had to read errors, inspect configuration, understand what AWS was actually doing, find the mismatch, and fix it.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;index.html/index.html&lt;/code&gt; error in particular was frustrating at first.&lt;/p&gt;

&lt;p&gt;But once I understood &lt;strong&gt;why&lt;/strong&gt; it happened, it became one of the most useful lessons from the project.&lt;/p&gt;

&lt;p&gt;I'm still learning AWS, React, and software development, but I'm slowly trying to replace:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Copy the code and hope it works"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;with:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"Understand what each component is doing, then debug when it doesn't."&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And I think that's a much better way to learn development.&lt;/p&gt;




&lt;h3&gt;
  
  
  Tech Stack
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Frontend&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;React&lt;/li&gt;
&lt;li&gt;Vite&lt;/li&gt;
&lt;li&gt;HTML&lt;/li&gt;
&lt;li&gt;CSS&lt;/li&gt;
&lt;li&gt;JavaScript&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cloud&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazon S3&lt;/li&gt;
&lt;li&gt;Amazon CloudFront&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Development&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;VS Code&lt;/li&gt;
&lt;li&gt;npm&lt;/li&gt;
&lt;li&gt;Git/GitHub&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  react #aws #cloudfront #s3 #webdevelopment #javascript #vite #beginners #devjourney #learninginpublic
&lt;/h1&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9m6f8l78nv9vlz9vfb6m.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9m6f8l78nv9vlz9vfb6m.png" alt=" " width="800" height="430"&gt;&lt;/a&gt;&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhdr93gdcag2m838fagms.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhdr93gdcag2m838fagms.png" alt=" " width="799" height="432"&gt;&lt;/a&gt;&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqqcvj8hbac5jlscq3xfs.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqqcvj8hbac5jlscq3xfs.png" alt=" " width="800" height="406"&gt;&lt;/a&gt;&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fihx7mg95qxrikvt23iqj.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fihx7mg95qxrikvt23iqj.png" alt=" " width="800" height="406"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>deployment</category>
      <category>react</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
