Skip to content

hongzz0618/aws-static-website-hosting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌐 Static Website Hosting on AWS

This project shows how to host a fast and secure static website using AWS services.
It uses Amazon S3 to store the site and CloudFront to deliver it globally with HTTPS.


📐 Architecture

AWS Static Website Diagram

  • S3 → Stores website files (HTML, CSS, JS, images).
  • CloudFront → Speeds up delivery and adds HTTPS.
  • ACM → Provides SSL certificate for secure access.
  • Route 53 → Optional, for custom domain setup.

✅ Why This Pattern?

Feature Benefit
Simple Easy to set up and manage
Low cost Pay only for storage and traffic
Secure HTTPS with managed certificates
Fast Global delivery via CDN

🌍 Real-World Use Cases

  • Personal portfolios
  • Company landing pages
  • Marketing microsites
  • Documentation sites

📦 What’s Inside

  • Architecture diagram
  • Terraform code for S3, CloudFront, ACM, and Route 53
  • Example static website with logo and assets
  • Deployment scripts

🖼️ Demo Screenshots

Here are a couple of screenshots of the deployed site:

Demo Screenshot 1
Demo Screenshot 2


🚀 Deployment Guide

# 1. Configure Terraform variables
# Edit terraform.tfvars with your project details
# project_name   = "YOUR_PROJECT_NAME"
# domain_name    = "YOUR_DOMAIN_NAME"
# hosted_zone_id = "YOUR_HOSTED_ZONE_ID"

# 2. Deploy the infrastructure
cd scripts
./deploy.sh

# 3. Verify your website

# 4. Destroy the infrastructure (optional)
cd scripts
./destroy.sh

About

Static website hosting on AWS using S3 and CloudFront — fast, secure, and fully managed with Terraform.

Topics

Resources

Stars

Watchers

Forks