Private bucketOnly CloudFront can read the files.
HTTPSA free certificate that renews itself.
Clean URLs/how-it-works/ serves a folder's index.html.
Redirects/old-page.html moves you here with a 301.
Real 404sA missing page gets the site's own 404.
Security headersHSTS, a strict content security policy and more.
The whole deployment
module "static_demo" {
source = "github.com/45squaredLLC/terraform-aws-static-site"
domain = "static-demo.45squared.com"
zone_name = "45squared.com"
include_www = false
site_dir = "${path.module}/static-demo"
redirects = {
"/old-page.html" = "/how-it-works/"
}
content_security_policy = "default-src 'self'; ..."
}
Change a file, run terraform apply, and the new version is live a minute later.