Skip to content

This is a Terraform module to provision a static website using AWS S3 and CloudFront with optional custom domain ability

License

Notifications You must be signed in to change notification settings

aashari/terraform-aws-static-website

Repository files navigation

AWS Static Website Terraform Module

This Terraform module provisions a static website using AWS S3 and CloudFront with optional custom domain support.

Overview Architecture Diagram

Features

  • S3 bucket for static asset storage
  • CloudFront distribution for content delivery
  • Optional custom domain support (Cloudflare or Route53)
  • Optional CloudFront function for request manipulation
  • Optional CloudFront access logging
  • S3 bucket versioning

Usage

Basic Usage (Without Custom Domain)

module "static_website" {
  source = "github.com/aashari/terraform-aws-static-website"
  name   = "my-static-website"
}

With Custom Domain (Cloudflare)