DEV Community

Cover image for How I Made My First Static Website Using Amazon S3 (As an AWS Beginner)
Kaustav Dey
Kaustav Dey

Posted on

3 1 1

How I Made My First Static Website Using Amazon S3 (As an AWS Beginner)

Not too long ago, I decided to start learning AWS. It seemed like one of those things everyone in tech was talking about — but also kind of intimidating. There’s a ton of services, acronyms flying around, and a whole dashboard that feels like a cockpit. So I thought: Why not start small? Let’s just get a simple website live using one AWS service.

That’s how I ended up making my very first static website using Amazon S3. If you’re also just getting into AWS, this post is for you.

🧠 Why Amazon S3?
Amazon S3 (Simple Storage Service) is basically cloud storage — you can upload files and access them from anywhere. But what I didn’t know at first is that you can actually host a static website with it. That means if your site is just HTML, CSS, and maybe some JavaScript — no backend stuff — you can host it on S3 without spinning up a server.

It sounded perfect for a beginner like me. No DevOps. No EC2. No headaches.

💻 Step 1: Building a Simple Website
I kept it super minimal. No frameworks, just plain HTML and CSS. Here’s what I used:

index.html

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>My First AWS Site</title>
</head>
<body>
  <h1>Hello, AWS!</h1>
  <p>This is my first static site hosted on S3.</p>
  <img src="output.jpg">
</body>
</html>
Enter fullscreen mode Exit fullscreen mode

output.jpg

Image description

That’s it. Two files. Just enough to test the process.

☁️ Step 2: Creating the S3 Bucket
Here’s where the AWS part begins:

Logged into the AWS Management Console.
Searched for S3 and clicked Create bucket.
Gave it a unique name (S3 bucket names are globally unique).
Unchecked “Block all public access” (important! Otherwise, no one can view your site).
Then I added a policy to only ensure my s3 object could read the stuff stored in it.
Created the bucket.
The policy I used is below. Just place the unique name of your bucket in ‘Bucket-Name’

{
    "Version": "2012-10-17",
    "Statement": [
     {
         "Sid": "PublicReadGetObject",
         "Effect": "Allow",
         "Principal": "*",
         "Action": [
             "s3:GetObject"
         ],
         "Resource": [
                "arn:aws:s3:::Bucket-Name/*"
         ]
     }
    ]
}
Enter fullscreen mode Exit fullscreen mode

At this point, I had cloud storage ready to go.

🌐 Step 3: Enabling Static Website Hosting
Inside the S3 bucket:

I clicked on the Properties tab.
Scrolled down to Static website hosting.
Enabled it and set index.html as the index document.
AWS gave me a URL. This would be the live address of my site.
But first, I had to upload the files and make sure they were public.

📤 Step 4: Uploading and Making Files Public
Went to the Objects tab.
Uploaded both index.html and style.css.
After uploading, I selected each file, clicked Actions > Make public.
(Note: You can set a bucket policy to make everything public automatically, butif you want you can stick with manual for now — it felt safer while learning.)

Image description

🔗 Step 5: Visiting My Site
With everything uploaded and public, I went back to the static hosting section in Properties and copied the Endpoint URL.

I pasted it into my browser, and boom — it worked. My little website was online. No servers, no deployment tools. Just files in a bucket.

🔍 What I Learned
AWS can feel like a lot, but starting with one service (like S3) makes it manageable.
Hosting a static site doesn’t need to be complicated.
Public access settings are a key part of getting S3 hosting to work.
The feeling of getting a website live — even a basic one — is honestly really satisfying.
✅ Final Thoughts
This was my first actual hands-on experience with AWS, and it went smoother than I expected. Sure, I had to Google a few things (especially around permissions), but I came away feeling a little more confident in navigating the AWS ecosystem.

If you’re new to AWS and wondering where to begin — host a static website on S3. It’s simple, useful, and gives you a nice win early on.

Next up for me? Maybe setting up a custom domain, adding HTTPS with CloudFront, or playing with Lambda. But for now, I’m just happy that I took the first step.

ACI image

ACI.dev: Best Open-Source Composio Alternative (AI Agent Tooling)

100% open-source tool-use platform (backend, dev portal, integration library, SDK/MCP) that connects your AI agents to 600+ tools with multi-tenant auth, granular permissions, and access through direct function calling or a unified MCP server.

Star our GitHub!

Top comments (0)

Survey image

Calling All Cloud Developers - Your Insights Matter

Take the Developer Nation Survey and help shape cloud development trends. Prizes await!

Join Today