Hosting a Static Website

Deployed a fully static portfolio site using S3, CloudFront, and Route 53 with HTTPS via ACM. Originally built for a mid-size business, later adapted as a personal project with GitHub Actions for CI/CD.

7/16/20252 min read

Introduction

When I began building my cloud portfolio, I wanted to start with something practical, scalable, and production-worthy — a website that reflects both who I am and how I work. Hosting a static site on AWS is one of the most reliable and cost-effective ways to get online, and more importantly, it introduces core AWS services that form the backbone of modern cloud architecture.

This wasn’t just a portfolio project — I initially built this solution for a mid-size company looking to modernize their online presence without the overhead of managing servers. The success of that rollout led me to adapt and fine-tune the setup for my own use.

Project Goals

  • Host a secure, static website with a custom domain

  • Use AWS-native services for speed, scalability, and reliability

  • Enable HTTPS encryption and caching for global performance

  • Apply cloud best practices using least-privilege security and IaC (planned)

Frontend Implementation

The site itself was built using clean, responsive static assets:

  • HTML5, CSS3, JavaScript

  • Optimized images

  • Minified styles and scripts

  • Structured folders for assets and versioning

All files are uploaded to an S3 bucket configured for static website hosting. I defined an index.html and error.html page, set appropriate MIME types, and applied cache-control headers to ensure content was delivered fresh but efficiently cached.

Backend Considerations (Serverless Approach)

Although a static site doesn’t need a traditional backend, the infrastructure that supports it is the backend:

  • Amazon S3: Stores and serves content globally

  • CloudFront: Caches and accelerates delivery through edge locations

  • ACM (AWS Certificate Manager): Automatically manages and renews SSL certificates

  • Cloudflare or Route 53: Handles DNS and domain routing

This allows me to deliver dynamic content (e.g., via JavaScript calls) while keeping the core app completely static and serverless.

Security Measures

Even for a static site, security is non-negotiable:

  • Bucket Policy: Blocks public access except via CloudFront (using Origin Access Control)

  • ACM SSL Certificate: Ensures HTTPS across all content

  • Cloudflare (optional): Adds additional protections like rate limiting, DNS security, and WAF rules

Infrastructure as Code (CDK Plan)

The initial version was deployed manually and via CLI, but I’m in the process of migrating everything to AWS CDK, which will:

  • Provision the S3 bucket

  • Attach CloudFront distribution

  • Generate and link ACM certificate

  • Connect DNS via Route 53

  • Define IAM roles and policies

This will make it fully reproducible and version-controlled.

Lessons Learned

  • Understood how CloudFront caching works and when to invalidate

  • Learned how to configure S3 for static hosting with best practices

  • Explored Route 53 and Cloudflare DNS options

  • Practiced securing a public site using IAM and bucket policies

Real-World Application

This project was originally delivered to a mid-size business looking to modernize their marketing website. They needed a fast-loading, globally available solution that didn’t rely on traditional servers or CMS platforms. After implementation, I adapted and extended the architecture for my own portfolio, applying what I learned in a more personalized way.

Conclusion

Hosting a static website on AWS is more than just a beginner project — it’s a hands-on introduction to serverless architecture, automation, and cloud-native thinking. This solution is scalable, secure, and fully in my control — and it now powers the site you’re reading this on.

🛠️ Tech Stack:

  • Amazon S3

  • Amazon CloudFront

  • AWS Certificate Manager (ACM)

  • Route 53