You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This S3 bucket is distributed by CloudFront at stage.example.com. Here, the page works only when I specify "index.html":
https://stage.example.com/contact/ 403 error--access denied
https://stage.example.com/contact/index.html works
My main motivation in using the S3 website was to get the index.html redirection, and avoid the Lambda@Edge redirection approach.
Expected Behavior
I want CloudFront to forward the request for https://stage.example.com/contact/ to the S3 website, which would respond with https://stage.example.com/contact/index.html. This is in fact possible. I have demonstrated it with another Terraform configuration.
Do you know how to get this to work? AWS did not know. I ask you because this module suggests that you have experience with using an S3 website as a CloudFront origin.
References
I am using my enhanced version of this module as described in PR #105. I believe that the redirection described here is orthogonal to PR #105 because:
An S3 website is a custom origin, which is supported as-is in version 0.35.0
The problem manifests whether or not the S3 website is public
Steps to Reproduce
This issue is really asking you to recall your past experience--"When you used an S3 website origin with CloudFront, how did you get this to work?" Still, here are the steps to reproduce the behavior:
Create the resources with module terraform-aws-cloudfront-s3-cdn
The URL that clients use to access the website must be specified using variable alias. I am inclined to recommend that alias be changed to a required variable.
Description
I took advantage of the new
website_enabled
feature to create a S3 website distributed by CloudFront.I can access the
contact/index.html
page directly from the S3 website without "index.html":http://namespace-environment-name-attribute.s3-website-us-east-1.amazonaws.com/contact/
This S3 bucket is distributed by CloudFront at stage.example.com. Here, the page works only when I specify "index.html":
My main motivation in using the S3 website was to get the
index.html
redirection, and avoid the Lambda@Edge redirection approach.Expected Behavior
I want CloudFront to forward the request for
https://stage.example.com/contact/
to the S3 website, which would respond withhttps://stage.example.com/contact/index.html
. This is in fact possible. I have demonstrated it with another Terraform configuration.Do you know how to get this to work? AWS did not know. I ask you because this module suggests that you have experience with using an S3 website as a CloudFront origin.
References
I am using my enhanced version of this module as described in PR #105. I believe that the redirection described here is orthogonal to PR #105 because:
Steps to Reproduce
This issue is really asking you to recall your past experience--"When you used an S3 website origin with CloudFront, how did you get this to work?" Still, here are the steps to reproduce the behavior:
Screenshots
If applicable, add screenshots or logs to help explain your problem.
Environment (please complete the following information):
Anything that will help us triage the bug will help. Here are some ideas:
The text was updated successfully, but these errors were encountered: