Skip to content
Go back

Hosting a static website on AWS S3

Published:

Hosting a static website on AWS S3 is a popular and cost-effective choice for beginners due to its simplicity, scalability, and high availability. Static websites consist of HTML, CSS, JavaScript, and image files – essentially, anything that doesn’t require server-side processing or a database.

Here’s a step-by-step guide to get your static website live on AWS S3:

Step-by-Step Guide:

1. Create an S3 Bucket

2. Upload Your Website Files

output

3. Enable Static Website Hosting

output

4. Set Bucket Policy for Public Read Access

Even though you unchecked “Block all public access” earlier, you still need a bucket policy to explicitly grant public read access to your website files.

output

5. Make Objects Public (using ACLs) - optional

While the bucket policy grants public read access, you also need to ensure that the objects themselves (your individual files) are publicly readable.

6. Access Your Website!

output

Important Considerations for Beginners:

Congratulations! You’ve successfully hosted your first static website on AWS S3.


Suggest Changes

Previous Post
AWS Application Load Balancer with a Custom Domain (Cloudflare)
Next Post
Request a new ACM certificate with cloudflare.