Skip to content

Kenny-AngJY/host-static-website-with-AWS-CloudFront

Repository files navigation

Check out my article on "Host a static website using AWS CloudFront with S3 & ALB as origins"

https://medium.com/@kennyangjy/host-a-static-website-using-aws-cloudfront-with-s3-alb-as-origins-9c68255bd72c


Caution: Cost will be involved in creating these resources. For more information, do visit the relavent resource pricing pages as it differs from region to region.


To provision the resources in this repository:

  1. git clone https://github.com/Kenny-AngJY/host-static-website-with-AWS-CloudFront.git
  2. If you have an ACM certificate in the us-east-1 region and a public Route53 hosted zone. You can modify the default value of the 3 variables below in ./variables.tf
  • acm_certificate_arn
  • hosted_zone_name
  • hosted_zone_id
  1. terraform init
  2. terraform plan
    If you left the "acm_certificate_arn" variable empty, there should be 27 resources to be created. Else, 28 resources to be created.
  3. terraform apply
    As no backend is defined, the default backend will be local. Do wait for 10-15 minutes for the resources to be provisioned.

Clean-up

  1. terraform destroy

Releases

No releases published

Packages

No packages published