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

Compatibility with CloudFront "Origin Access Identity" usage? #313

Open
moved-to-gitlab opened this issue Jul 27, 2018 · 0 comments
Open

Comments

@moved-to-gitlab
Copy link

Can I use this gem after configuring AWS's Origin Access Identity, which uses a CloudFront distribution granted read permissions for a non-public S3 bucket not configured for static website hosting? (The idea is to force all traffic via CloudFront, since CloudFront pricing is lower than S3 pricing.)

With this configuration, the CloudFront distribution uses the S3 bucket's REST API endpoint for the "Origin Domain Name" and not the static website endpoint.

Ideally all files in the S3 bucket remain --acl private, the bucket is never enabled for static website hosting, and the CloudFront distribution serves all objects. Direct access by end-users to S3 objects is never permitted, even if someone discovers the bucket and object names.

For clarity, here are the current server responses which I wish to preserve, using a CloudFront distribution with an Alternate Domain Name:

http://BUCKET.s3-website-us-east-1.amazonaws.com/FILE.EXT   404 Not Found
https://XXXXXXXXXXXXX.cloudfront.net/FILE.EXT               200 OK
https://WWW.EXAMPLE.COM/FILE.EXT                            200 OK
https://s3-us-east-1.amazonaws.com/BUCKET/FILE.EXT          403 Forbidden

Lastly, thanks for an amazing piece of software. I use it regularly with standard configurations, CloudFront, and public S3 buckets, and it has worked flawlessly for a long time.

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

No branches or pull requests

1 participant