Created
December 26, 2016 14:03
-
-
Save mrsarm/03598566c048f505c9fd1d7fdc21fbc6 to your computer and use it in GitHub Desktop.
AWS Bucket Policy to deny access to all except NotPrincipal list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Id": "Policy9999999990001", | |
"Statement": [ | |
{ | |
"Sid": "Deny access except NotPrincipal list", | |
"Effect": "Deny", | |
"NotPrincipal": { | |
"AWS": [ | |
"arn:aws:iam::123000004567:role/xxxx-eb-ec2-role", | |
"arn:aws:iam::123000004567:user/Marianoruiz", | |
"arn:aws:iam::123000004567:user/pepe2222" | |
] | |
}, | |
"Action": "s3:*", | |
"Resource": "arn:aws:s3:::bucket-name" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment