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
After specifying an existing bucket as a scanning target, I attempted to remove it and was met with the following error: An error occurred (AccessDenied) when calling the GetBucketNotificationConfiguration operation: Access Denied.
Disclaimer -- this is running in an enterprise type environment in gov cloud and I'm not savvy enough to understand the permissions boundaries and the policies granted to the roles I have access to - just reporting this based on what I've been told. That said, here is what I've attempted. Note that my pseudo-code below does not include the Aspects that are unique to this environment.
This successfully setup an-existing-bucket to be scanned after running cdk deploy.
Remove bucket as a scan target
Now, I'd like to remove an-existing-bucket from the scan targets. My expectation was that I could just update app.py, remove the references that added it, re-run cdk deploy and the bucket policy would be removed, etc.
Now cdk deploy gives me an error about lacking permissions for GetBucketNotificationConfiguration.
Someone smarter than me has provided this analysis:
It seems like the permissions for the Role attached to the "clamav-scan-stack-BucketNotificationsHandler050a05-QNovedi171qG" lambda (service-clamav-scan-stack-BucketNotificationsHandler050a0587b75) doesn't have permissions for s3:GetBucketNotificationConfiguration. It only has s3:PutBucketNotification, so it's not limited by the permissions boundary.
After the s3:GetBucketNotificationConfiguration permission was added to the role, I was able to remove the imported bucket successfully.
Thanks for taking a look at this!
The text was updated successfully, but these errors were encountered:
Hey! I'm glad you figured it a solution to your issue.
I don't understand what the question is, but It seems like you have some restrictions in your deployment roles and permissions boundaries that are preventing successful destruction.
Summary
After specifying an existing bucket as a scanning target, I attempted to remove it and was met with the following error:
An error occurred (AccessDenied) when calling the GetBucketNotificationConfiguration operation: Access Denied.
Disclaimer -- this is running in an enterprise type environment in gov cloud and I'm not savvy enough to understand the permissions boundaries and the policies granted to the roles I have access to - just reporting this based on what I've been told. That said, here is what I've attempted. Note that my pseudo-code below does not include the Aspects that are unique to this environment.
Import / add an existing bucket to be scanned
This successfully setup
an-existing-bucket
to be scanned after runningcdk deploy
.Remove bucket as a scan target
Now, I'd like to remove
an-existing-bucket
from the scan targets. My expectation was that I could just updateapp.py
, remove the references that added it, re-runcdk deploy
and the bucket policy would be removed, etc.Now
cdk deploy
gives me an error about lacking permissions for GetBucketNotificationConfiguration.Someone smarter than me has provided this analysis:
After the
s3:GetBucketNotificationConfiguration
permission was added to the role, I was able to remove the imported bucket successfully.Thanks for taking a look at this!
The text was updated successfully, but these errors were encountered: