Skip to content

Instantly share code, notes, and snippets.

@asimpson
Last active January 3, 2016 03:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save asimpson/11335531 to your computer and use it in GitHub Desktop.
Save asimpson/11335531 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