Hosting a Static Website on AWS: A Beginner-Friendly Guide

#AWS #S3

I’m pumped to share a cool AWS project I’ve been working on. Today, we’re diving into how to deploy a static website (HTML, CSS, and JavaScript) using Amazon S3, CloudFront, and Route 53. This guide is for junior devs and curious folks who want to learn AWS in a fun, hands-on way. I believe teaching is the best way to learn, so let’s break this down step by step—no overwhelming details, just the big picture to get you started!

Project architecture:

project architecture

Why This Project?

This setup is perfect for hosting a portfolio, blog, or small project, offering a custom domain, secure HTTPS, and lightning-fast global delivery. It’s an ideal way to explore AWS without getting lost in the weeds. I’m using a simple index.html homepage (linking to my profiles) as a Linktree alternative—a clean and effective way to manage your links. Ready? Let’s go!

What You’ll Need

Step 1: Store Your Website in S3

Amazon S3 is like a trusty cloud storage box for your website files—think of it as a super cheap and scalable folder in the cloud for literally anything you want.

That’s it for S3—your files are now in the cloud!

Step 2: Secure Your Domain with an SSL Certificate

To make your site secure with HTTPS, we’ll use AWS Certificate Manager (ACM) for a free SSL certificate.

Once validated, your SSL certificate is ready to secure your site.

Step 3: Set Up CloudFront for Speed

CloudFront is AWS’s Content Delivery Network (CDN), making your site load fast worldwide.

Copy the bucket policy from CloudFront and add it to your S3 bucket’s permissions. Deployment takes a few minutes.

Step 4: Connect Your Domain with Route 53

Route 53 handles DNS to link your domain to CloudFront.

Update your domain registrar’s name servers to use Route 53’s NSClickable button records.

Step 5: Test It Out!

Once CloudFront is deployed (check the console), visit follow.jpdiaz.dev. Your site should load with HTTPS! Click around to test links. You can also try the CloudFront URL, but your custom domain is the star.

Why This Rocks

This setup is simple, secure, and fast:

What I Learned

AWS services fit together like a puzzle—S3 stores, CloudFront distributes, and Route 53 connects. The key? CloudFront certificates must be in us-east-1. Once you nail that, it’s smooth sailing.

What’s Next?

Try adding:

I had a blast building this, and I hope it sparks your curiosity to try AWS! Let’s connect on Linkedin—I’d love to hear whether you prefer this S3/CloudFront/Route 53 stack or AWS Amplify for your projects!