All Modules
AWSHosting

S3 Static Site

S3 + CloudFront + ACM certificate for static website hosting

Usage

module "s3_static_site" {
  source = "github.com/fencepencil/fencepencil-aws-modules//s3-static-site"

  domain_name = "<domain_name>"
  bucket_name = "<bucket_name>"
  route53_zone_id = "<route53_zone_id>"

  tags = var.tags
}

Inputs (6)

NameTypeDescriptionDefaultRequired
domain_namestringPrimary domain name for the siteyes
subject_alternative_nameslist(string)Additional domains for the certificate[]no
bucket_namestringS3 bucket name (globally unique)yes
route53_zone_idstringRoute53 hosted zone IDyes
price_classstringCloudFront price classPriceClass_100no
tagsmap(string)Tags to apply to all resources{}no

Outputs (4)

NameDescription
bucket_nameName of the S3 bucket
cloudfront_distribution_idCloudFront distribution ID
certificate_arnARN of the ACM certificate
website_urlThe website URL

More AWS Modules

Browse our full library of AWS infrastructure modules.

View all AWS modules