Skip to content

Instantly share code, notes, and snippets.

@JacobBennett
Forked from asimpson/bucket-policy.json
Created January 3, 2016 03:19
Show Gist options
  • Save JacobBennett/7e0bbd61b28abad33b78 to your computer and use it in GitHub Desktop.
Save JacobBennett/7e0bbd61b28abad33b78 to your computer and use it in GitHub Desktop.
A policy template to restrict a user's access to a single bucket.
{
"Version": "2012-10-17",
"Statement": [
{
"Action": ["s3:GetBucketLocation", "s3:ListAllMyBuckets"],
"Effect": "Allow",
"Resource": ["arn:aws:s3:::*"]
},
{
"Action": ["s3:ListBucket"],
"Effect": "Allow",
"Resource": ["arn:aws:s3:::test-bucket/*"]
},
{
"Effect": "Allow",
"Action": ["s3:*"],
"Resource": ["arn:aws:s3:::test-bucket/*"]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment