Skip to content

cloudprohim/aws-s3-cloudfront-static-site

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ AWS S3 + CloudFront Static Website

Production-style static website deployment on AWS using Terraform, Amazon S3, CloudFront CDN, and Origin Access Control (OAC).

This project demonstrates Infrastructure as Code (IaC), secure content delivery, cloud architecture fundamentals, and AWS best practices through a fully automated Terraform deployment.


🌐 Live Website

The website is deployed through Amazon CloudFront and delivered globally using AWS edge locations.

Live Demo

https://d28xs5hc1on3kz.cloudfront.net


Live Website (Initial Deployment)

AWS S3 CloudFront Static Website

Enhanced Portfolio Website

Enhanced Portfolio Website Architecture

Enhanced Portfolio Website Technical Journey


πŸ“– Project Overview

The objective of this project was to design and deploy a secure static website architecture on AWS using Terraform.

The solution leverages:

  • Terraform for Infrastructure as Code
  • Amazon S3 for static website hosting
  • Amazon CloudFront for global content delivery
  • Origin Access Control (OAC) for secure S3 access
  • IAM Policies for controlled permissions
  • GitHub for version control and project documentation

The architecture follows AWS security best practices by ensuring website content is delivered through CloudFront rather than accessed directly from the S3 bucket.


πŸ— Architecture Diagram

flowchart LR
    U[πŸ‘€ User]
    CF[🌍 CloudFront CDN]
    OAC[πŸ” Origin Access Control]
    S3[πŸͺ£ Amazon S3 Bucket]
    WEB[πŸ“„ Static Website]

    U --> CF
    CF --> OAC
    OAC --> S3
    S3 --> WEB
Loading

☁ AWS Services Used

Service Purpose
Amazon S3 Static website hosting
Amazon CloudFront Global content delivery
Origin Access Control (OAC) Secure CloudFront-to-S3 communication
IAM Policies Access management
Terraform Infrastructure provisioning
GitHub Version control and project documentation

πŸ”¨ Deployment Process

1. Repository Setup

  • Created GitHub repository
  • Built Terraform project structure
  • Configured VS Code environment

2. Infrastructure Configuration

Configured:

  • AWS Provider
  • Terraform Variables
  • Terraform Outputs
  • State Management

3. Amazon S3 Deployment

Provisioned:

  • S3 Bucket
  • Ownership Controls
  • Public Access Configuration
  • Static Website Configuration

4. Website Content Deployment

Uploaded:

  • index.html
  • error.html

using Terraform-managed S3 objects.

5. CloudFront Configuration

Provisioned:

  • CloudFront Distribution
  • Origin Access Control (OAC)
  • HTTPS Redirection
  • Secure S3 Access

6. Validation & Testing

Verified:

  • Terraform State
  • S3 Object Uploads
  • CloudFront Distribution
  • Website Accessibility
  • Infrastructure Outputs

πŸ“Έ Project Build Evidence

Project Setup

Project Setup

Terraform Initialization & Validation

Terraform Init

Terraform Plan - S3 Deployment

Terraform Plan

S3 Bucket Creation & State Verification

S3 Deployment

Terraform Plan - Website Upload

Website Upload Plan

Website Files Uploaded

HTML Upload

S3 Object Verification

S3 Verification

CloudFront Deployment

CloudFront Apply

CloudFront Outputs

CloudFront Outputs


βš™ Terraform Commands Used

terraform init
terraform fmt
terraform validate
terraform plan
terraform apply
terraform state list

🎯 Skills Demonstrated

  • Infrastructure as Code (Terraform)
  • Amazon S3 Static Website Hosting
  • CloudFront CDN Deployment
  • Origin Access Control (OAC)
  • IAM Policy Configuration
  • AWS Security Best Practices
  • Git & GitHub Workflow
  • Cloud Infrastructure Documentation
  • Troubleshooting & Validation
  • Cloud Architecture Fundamentals

πŸ“ˆ Technical Journey

flowchart LR
    FN[🌐 Fibre Network Engineering]
    SO[πŸ›‘ Security Operations]
    TS[πŸ›  Technical Support]
    CE[☁ Cloud Engineering]

    FN --> SO --> TS --> CE
Loading

Progressed from fibre network engineering to security operations and technical support, building strong expertise in networking, system integration, troubleshooting, and infrastructure technologies.

Currently focused on cloud engineering, designing scalable AWS solutions using Terraform, automation, cloud-native architecture principles, and AWS best practices.


πŸš€ Project Outcomes

βœ… Fully automated infrastructure deployment using Terraform

βœ… Secure CloudFront-to-S3 architecture using Origin Access Control (OAC)

βœ… Global content delivery through Amazon CloudFront

βœ… Infrastructure tracked and managed through Terraform State

βœ… Version-controlled deployment using GitHub

βœ… Production-style AWS static website architecture

βœ… Portfolio-ready cloud engineering project


πŸ‘¨β€πŸ’» Author

Himanshu Himanshu

Cloud Engineering Graduate | AWS & Terraform Practitioner

Interested in Cloud Support Engineering, Cloud Operations, Site Reliability Engineering (SRE), Infrastructure Engineering, and Cloud Consulting opportunities.

LinkedIn

https://www.linkedin.com/in/himanshu-himanshu-1a00a1a4/

GitHub

https://github.com/cloudprohim

About

Production-style static website hosting on AWS using S3, CloudFront, Terraform, HTTPS-ready architecture, and secure bucket access.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors