cloudmaniac / terraform-aws-static-website

Terraform Module to provision an AWS static website using Route53, S3, and CloudFront.
https://registry.terraform.io/modules/cloudmaniac/static-website/aws/
MIT License
48 stars 38 forks source link

Addresses "Getting AccessDenied for redirect domain" #3

Closed msb closed 3 years ago

msb commented 3 years ago

As pointed out by @marcusbelcher, using the redirect bucket's website endpoint appears to fix the problem.

Unlike @jakobpin's solution this works for me without having to make the bucket public.

Addresses https://github.com/cloudmaniac/terraform-aws-static-website/issues/1

(it's like a bus - you wait for ages then 2 come along at once)

cloudmaniac commented 3 years ago

The goal of using the S3 API endpoint was to avoid the possibility to directly access the S3 bucket HTTP URL (for SEO purpose, to avoid duplicate content). I'll dig if I find another solution, otherwise I'll go with your suggestion.