This opinionated Terraform module creates a private S3 bucket configured for static website hosting and a CloudFront distribution for it.
- Bucket is NOT public. ONLY CloudFront is allowed access to it using a Referer header. Details here.
- Bucket name is auto-generated and outputted.
- SSE-S3 encryption is enabled by default.
- Bucket must contain index.html.
- CloudFront caching is disabled.
- CloudFront is only deployed to US, Canada, and Europe.
- CloudFront custom domain is not supported. Distribution URL is outputted.