Skip to content

Instantly share code, notes, and snippets.

@trekdemo
Created January 10, 2012 10:05
Show Gist options
  • Save trekdemo/1588314 to your computer and use it in GitHub Desktop.
Save trekdemo/1588314 to your computer and use it in GitHub Desktop.
Restrict user access to a specified bucket on Amazon S3
{
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:ListAllMyBuckets",
"s3:ListBucket",
"s3:GetBucketLocation"
],
"Resource": "arn:aws:s3:::*"
},
{
"Effect": "Deny",
"Action": [
"s3:ListBucket"
],
"NotResource": [
"arn:aws:s3:::bucket1",
"arn:aws:s3:::bucket1/*"
]
},
{
"Effect": "Allow",
"Action": [
"s3:*"
],
"Resource": [
"arn:aws:s3:::bucket1",
"arn:aws:s3:::bucket1/*"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment