Skip to content

Instantly share code, notes, and snippets.

@slashr
Created March 27, 2016 09:22
Show Gist options
  • Save slashr/e05572172b8193769451 to your computer and use it in GitHub Desktop.
Save slashr/e05572172b8193769451 to your computer and use it in GitHub Desktop.
{
"Version": "2012-10-17",
"Statement": [
{
"Action": ["s3:ListAllMyBuckets", "s3:GetBucketLocation"],
"Effect": "Allow",
"Resource": ["arn:aws:s3:::*"]
},
{
"Action": ["s3:ListBucket"],
"Effect": "Allow",
"Resource": ["arn:aws:s3:::<bucket-name>"],
"Condition":{"StringEquals":{
"s3:prefix":["","home/"],"s3:delimiter":["/"]}}
},
{
"Action": ["s3:ListBucket"],
"Effect": "Allow",
"Resource": ["arn:aws:s3:::<bucket-name>"],
"Condition":{"StringLike":{"s3:prefix":["home/${aws:username}/*"]}}
},
{
"Action":["s3:*"],
"Effect":"Allow",
"Resource": ["arn:aws:s3:::<bucket-name>/home/${aws:username}"
"arn:aws:s3:::<bucket-name>/home/${aws:username}/*"]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment