Skip to main content

Command Palette

Search for a command to run...

Hosting My First Static Website on AWS S3

Published
3 min read
Hosting My First Static Website on AWS S3
B

Cloud Specialist with hands-on experience in Microsoft Azure, now transitioning into AWS. I’m focused on building, deploying, and optimizing cloud solutions while sharing my learning journey through real-world projects and documentation.

Introduction

One of the most exciting things about learning AWS is realizing that you can host a fully functional website without using any traditional web server.
Today, I took my learning a step further by hosting a static website on Amazon S3, and it felt like turning a simple storage bucket into a mini web server!

Here’s exactly how I did it 👇


⚙️ Step-by-Step Process

1. Create a New S3 Bucket

Just like before:

  • Go to your AWS Management Console → S3

  • Click Create bucket

  • Give it a unique name (it must match your website domain if you plan to use one, e.g., myawssiteportfolio.com)

  • Choose your Region

  • Uncheck “Block all public access” (because websites need to be viewable publicly)

  • Confirm and click Create bucket

Bucket created successfully!


2. Upload Your Website Files

Your static website files usually include:

  • index.html (homepage)

  • style.css

  • images/ or assets/ folder

Now:

  • Open your bucket

  • Click Upload → Add files and select all your site files

  • Hit Upload


3. Enable Static Website Hosting

Now comes the magic moment ✨

  • Go to your bucket’s Properties tab

  • Scroll down to Static website hosting

  • Click Edit → Enable

  • Choose Host a static website

  • In the Index document box, enter: index.html

  • (Optional) In Error document, enter: error.html

  • Save changes

You’ll now see a Bucket website endpoint — that’s your public website link!

Example:

http://myawssiteportfolio.s3-website-us-east-1.amazonaws.com

Click it — and boom 💥
Your static site is live on AWS!


4 Make It Public (Without Using Bucket Policy)

After uploading my files, I wanted people to actually see my website — but by default, S3 keeps everything private for security.

So here’s what I did instead of using a JSON bucket policy:

  1. I went to the Objects tab in my S3 bucket.

  2. Selected all my uploaded files (index.html, style.css, and images).

  3. Clicked Actions → Make public using ACL.

At first, the option was greyed out — but I realized it was because “Block all public access” was still on. Once I turned that off during bucket creation, the Make Public button became active.

After making the files public, I clicked on my Static Website Endpoint, and there it was — my first website hosted entirely on AWS S3!

Now, your site should be fully accessible to the public!


💡 Why This Is Important

Hosting on S3 is:

  • Cost-effective — You only pay for what you use.

  • Scalable — It handles any traffic size automatically.

  • Serverless — No maintenance, no backend setup.

  • Secure & Fast — Easily combined with CloudFront (CDN) for global delivery.

For beginners, this project is a great way to understand how storage can become web hosting on AWS.


🧠 Key Takeaways

  • You can host any static website (portfolio, blog, or resume) using just S3.

  • Combine it later with CloudFront + Route 53 for a custom domain and HTTPS.

  • Always check your Bucket Policy and Public Access settings to avoid errors.


🪴 Reflection

This project was one of those “aha!” moments in my AWS learning journey. Seeing my own HTML page live on the cloud gave me a clear picture of how flexible AWS really is.

More from this blog

"

"The Cloud Computing World"

38 posts

Exploring the evolving world of cloud computing, from Azure to AWS. This is where I document my hands-on projects, lessons learned, and growth as a Cloud Specialist.