-
Notifications
You must be signed in to change notification settings - Fork 276
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
Unable to set two notification handlers for same Bucket #101
Comments
This could be supported by adding a current timestamp or some kind of rule source hash to the statement ID here:
would you like to give it a try and submit a PR? |
I would rather think of checking if policy for that bucket already exists and skipping that step if it does. This could be accomplished by checking in IAM or storing policies together with role in |
It would be good to have a check if the equivalent policy exists in IAM, but that wouldn't work by name, it should work by checking the contents. |
As Claudia is setting Inline Policy for that role and it's using Bucket name based convention, I do not see a reason why we could not trust this approach. I believe I'm missing something here, so I would appreciate some help in understanding this aspect. Looking over every policy content seems to be out of question, because seems to be overcomplicated for what we are trying to achieve here. As a different approach we could be simulating/testing if our role already has all needed permissions, without the need of going into the details. We should be able to use AIM itself to do such check, which would be a equivalent of I also understand that user is able to provide his own policies in |
it's possible for someone to attach additional policies outside claudia, so I wouldn't trust too much the fact that the policy with that name exists. I didn't know about simulate-principal-policy, that actually sounds quite nice. If I understand correctly what will happen there, if the simulation succeeds we know not to add the policy? This would allow eg externally allowed roles and so on to be used without duplicating policy rights. |
allows the same lambda version to bind multiple times to the same bucket needs better implementation in the future where it simulates policies to check access instead of adding multiple times
Thanks for this fix! 👍 I've had no time to work on it :/ |
this is now on NPM as 2.8.0 |
claudia add-s3-event-source --profile private --region eu-west-1 --bucket test.secretescapes.com --events s3:ObjectCreated:* --prefix sales-upload/ --suffix .jpg
allows me to setup S3 Bucket Notification handler.Unfortunately, this command allows to setup only one command at all for one bucket. So when I run:
claudia add-s3-event-source --profile private --region eu-west-1 --bucket test.secretescapes.com --events s3:ObjectCreated:* --prefix sales-upload/ --suffix .png
to add new handler for different suffix I get:Just try to add second handler for same Bucket but different
prefix
orsuffix
.The text was updated successfully, but these errors were encountered: