2 Answers
I did a similar experiment creating a DENY All S3 bucket policy and I had an Admin IAM user (not root) create DenyALL policy for the S3 bucket that Ryan showed on his video.
But I added under PERMISSIONS tab the Admin user Canonical name to "Access for Other AWS Accounts" Checking List Objects/ Write Objects, Read bucket policies and Write Bucket policies.
After the Deny All bucket policy was applied I had very limited view of the bucket getting Access Denied in ALL bucket screens.
I could not even see the bucket contents even though I selected under ACCESS FOR OTHER AWS ACCOUNTS to show the Admin User List, Read, Write object permissions . I also did not have DELETE option enable and I could not see the Bucket Policy anymore only Access Denied.
I logged as the ROOT account and when I went to the same S3 bucket, I had most Access Denied msgs, and I could not see the files in the bucket but I could SEE the BUCKET Policy "Denying ALL policy" and I was able to create an ALLOW ALL S3 Bucket Policy and Copy and Paste it on TOP of the DENY ALL policy and SAVE it and everything showed up.
Conclusion:
So the EXPLICIT DENY ALL still seems to OVERULE everything, even with setting up the EXPLICIT ALLOW "Access to other AWS accounts" the IAM User Admin acct were overwritten by DENY ALL.Even most of the ROOT Account capabilities on S3 but he was allowed to change the bucket Policy to ALLOW ALL…. Interesting that AWS allows ROOT user to have some limited capabilities to "fix" some policies.
I’m not 100% sure but to me the ":" in "AIDAIDGDHUPLOP2PSST3O:*" shouldn’t be there. This would make the StringNotLike in the DENY always be true except for the root user.
I would think just applying the DENY clause should work. You should NOT need the ALLOW clause.