Skip to content

Instantly share code, notes, and snippets.

@benkoller
benkoller / s3-static-hosting.tf
Created March 27, 2021 08:19
A terraform script to create all resources one might need to self-host a static page on S3. Includes a SSL cert, DNS records, Bucket, and a Cloudfront distribution.
terraform {
required_providers {
aws = {
version = "3.11"
}
}
}
provider "aws" {
shared_credentials_file = "$HOME/.aws/creds"