Skip to content

Handle "NoSuchEntity" exception when revoking access to bucket

Compare
Choose a tag to compare
@xoen xoen released this 07 Jan 11:42
4f4f08d

When trying to revoke access to a bucket the code tries to load the
corresponsing IAM role's s3-access inline policy but if the IAM role
doesn't exist this would of course fail.

This exception is not ignored when revoking access as users/apps can only have access to buckets through their canonical IAM role, if this doesn't exist (for whatever reason) they shouldn't have access to anything.

NOTE: This was also preventing deletion of a user/app without a role as their access to buckets is revoked before deleting them.

PR: #793
Ticket: https://trello.com/c/vwgmnhBX