Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow bucket_regional_domain_name as an output #20

Closed
sumitsarkar opened this issue Jan 15, 2020 · 0 comments · Fixed by #28
Closed

Allow bucket_regional_domain_name as an output #20

sumitsarkar opened this issue Jan 15, 2020 · 0 comments · Fixed by #28

Comments

@sumitsarkar
Copy link

sumitsarkar commented Jan 15, 2020

Use Case:

When using this module for a cloudfront distribution, the FQDN provided by the output
bucket_domain_name can't yield immediate results from Cloudfront. Issue explained here: https://aws.amazon.com/premiumsupport/knowledge-center/s3-http-307-response/

If the above URL is not accessible, here's the excerpt:

If you're using an Amazon CloudFront distribution with an Amazon S3 origin, CloudFront forwards requests to the default S3 endpoint (s3.amazonaws.com), which is in the us-east-1 Region. If you must access Amazon S3 within the first 24 hours of creating the bucket, you can change the Origin Domain Name of the distribution to include the regional endpoint of the bucket. For example, if the bucket is in us-west-2, you can change the Origin Domain Name from bucketname.s3.amazonaws.com to bucketname.s3-us-west-2.amazonaws.com.

The way to avoid the redirects within the first 24 hours would be to use origin_group in terraform for the distribution and have the S3 regional endpoint as a failover.

Required Change:

Please make bucket_regional_domain_name one of the output variables from the module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant