Host your static website on AWS under a minute.
Table of Contents
This terraform module will create a private S3 bucket, CloudFront distribution with HTTPS endpoint and also origin access identity on our S3 bucket, SSL certificate with certificate manager, and finally it will create a record and it will point to our CloudFront distribution.
Before the deployment of this terraform module, make sure your hosted zone exists in Route 53 and move your domain to Route53 by changing NS records on your DNS provider.
Change these two variables in the terraform.tfvars file.
SiteTags = "Example" (Tag value of the resources.)
domainName = "example.com" (This domain name should exists in the Route53. This module point this domain to CloudFront distribution and it will create SSL certificate for this domain name.)
You can now run this module when you change the variables.
terraform init
terraform plan
terrafom apply --auto-approve