Last active
December 18, 2015 04:39
-
-
Save brock/5727323 to your computer and use it in GitHub Desktop.
Simple AWS IAM Group policy to limit a client to read-only access to a single bucket. They'll be able to see the names of all other buckets, but won't be able to get into them. They will be able to see all folders and files in the bucket.
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
{ | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": ["s3:ListBucket", "s3:ListAllMyBuckets" ], | |
"Resource": "arn:aws:s3:::*" | |
}, | |
{ | |
"Effect": "Deny", | |
"Action": ["s3:ListBucket"], | |
"NotResource":["arn:aws:s3:::bucketname", "arn:aws:s3:::bucketname/*"] | |
}, | |
{ | |
"Effect": "Allow", | |
"Action": ["s3:ListBucket","s3:GetObject"], | |
"Resource": ["arn:aws:s3:::bucketname", "arn:aws:s3:::bucketname/*"], | |
"Condition": {} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment