-
Notifications
You must be signed in to change notification settings - Fork 34
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
[Suggestion]: Update Docs about bucket permissions #66
Comments
Thanks, glad you're enjoying the project! So, I was reviewing this and I realized that the deployment already automatically creates a role and inline policy to "GetObject" on your bucket and that role gets applied the the lambda function. I'm not exactly sure why adding the policy to allow an ApiGateway to access a bucket would make a difference since the ApiGateway doesn't serve content directly from the bucket - everything gets proxied through your Lambda function. Perhaps there's something unique about your setup that's making this necessary? I did a test deployment where I created a new bucket with all of the defaults ticked (restrict all access) and made a deployment and was able to generate transforms from that bucket. Let me know if you have any additional info that could help me better understand what's going on here. |
@Mosnar Could it be that we needed to use an existing bucket? We've deployed this in our staging environment and are preparing to roll this out on production. We've got a lot of images and do a lot of page / image requests. Our team has pointed out a few bugs, but I'll investigate and open new issues if it is library related. I might even dig in and submit a PR or two if I can. The environment is a pleasure to work in. |
Let's leave this open until we can figure out how to reproduce the issue from scratch - I'd rather people not have to worry about this at all. |
I could be wrong, but I think the issues stems directly from migrating from an existing bucket in a live environment. I ran a fresh install without an existing bucket and I didn't have this issue. To replicate the issue:
The Gateway shouldn't be able to access the image. If you like, I can run through the steps again to confirm. |
Amazing piece of software! Seriously. Excellent performance. Easy deployment. 👍
Ran into one issue that took me a few minutes to figure out. If you want to lock down bucket access you need to specific the ApiGateway as the principal not the cloudfront arn. Duh. An example policy like so works:
Although, perhaps you have additional suggestions for bucket security.
Just thought I'd point it out the issue as it tripped me up. Might be worth updating the docs.
Thanks again.
The text was updated successfully, but these errors were encountered: