AWS S3 + CloudFront Static Website

Production-style static website deployment using Terraform, Amazon S3, CloudFront CDN and Origin Access Control.

🏗 Terraform 🪣 Amazon S3 🌍 CloudFront CDN 🔐 OAC Security 📦 GitHub

Architecture Flow

👤User
🌍CloudFront
🔐OAC
🪣S3 Bucket
📄Website

Project Overview

This project demonstrates a secure static website architecture deployed on AWS using Infrastructure as Code. Website content is stored in Amazon S3 and delivered globally through CloudFront. Origin Access Control ensures users access content through CloudFront instead of directly from the S3 bucket.

Step-by-Step Build Process

  1. Created a GitHub repository.
  2. Cloned the repository into Visual Studio Code.
  3. Built Terraform project structure.
  4. Configured AWS provider and variables.
  5. Created an S3 bucket using Terraform.
  6. Configured ownership controls and public access settings.
  7. Enabled static website hosting.
  8. Uploaded HTML files using Terraform-managed S3 objects.
  9. Created CloudFront Origin Access Control.
  10. Created CloudFront distribution.
  11. Added secure S3 bucket policy for CloudFront access.
  12. Verified website delivery through CloudFront.

Terraform Commands Used

terraform init – Initialize Terraform.

terraform fmt – Format Terraform code.

terraform validate – Validate configuration.

terraform plan – Preview infrastructure changes.

terraform apply – Deploy infrastructure.

terraform state list – Verify Terraform-managed resources.

Skills Demonstrated

Technical Journey

🌐Fibre Network Engineering
🛡️Security Operations
🛠️Technical Support
☁️Cloud Engineering

Progressed from fibre network engineering to security operations and technical support, building strong expertise in networking, system integration, and troubleshooting. Currently focused on cloud engineering, designing scalable AWS solutions using Terraform and serverless technologies.

Author

Built by Himanshu Himanshu as part of a hands-on AWS Cloud Engineering portfolio project.