From Zero to Live: My Journey to Hosting a Static Website with Amazon S3

By Colbi Johnson | January 16, 2025 | 7 min read

Why I Chose Static Website Hosting

Static websites are simple yet powerful. They are lightweight, cost-effective, and require minimal maintenance compared to dynamic websites. For my first cloud project, I wanted to focus on understanding the fundamentals of AWS services while creating something practical that I could use to showcase my portfolio.

The Steps I Took

Setting Up the S3 Bucket

I started by creating an Amazon S3 bucket to store my website files. I named the bucket to match my domain name for consistency. Configuring the bucket for static website hosting was straightforward. AWS provides clear options to enable this functionality and set an index document.

S3 Bucket Setup

Uploading Website Files

I uploaded my HTML, CSS, and JavaScript files to the bucket. AWS's user-friendly interface made the upload process seamless.

Uploaded Bucket Objects

Configuring Permissions

One of the challenges I encountered was ensuring the correct permissions were set. I needed to make the bucket public so the website could be accessed by users. After some research and troubleshooting, I applied a bucket policy that allowed public read access to the files.

Bucket Policy Configuration

Connecting a Custom Domain

Using Route 53, I set up my domain to point to the S3 bucket. This involved configuring DNS records, including an A record and a CNAME record.

Route 53 Domain Setup

Enabling HTTPS

Security is essential, so I secured my website with HTTPS. This step required integrating Amazon CloudFront, attaching an SSL certificate through AWS Certificate Manager, and updating DNS settings.

Certificate Issued for HTTPS

Challenges I Faced and How I Solved Them

Problem-Solving Strategies

To overcome these challenges, I relied on AWS documentation, remained patient with DNS propagation, and broke down tasks into manageable steps. Each milestone—from uploading files to resolving SSL certificate issues—was a small victory that kept me motivated.

Key Takeaways

What’s Next?

This project marked the beginning of my cloud journey. My next project involves creating a text-to-speech converter using Amazon Polly—a tool I’ll use to narrate this very blog post!

Conclusion

Hosting a static website on Amazon S3 is an excellent starting point for anyone new to the cloud. If you’re considering your first cloud project, I highly recommend giving static website hosting a try.