Skip to content

Instantly share code, notes, and snippets.

@fbukevin
Last active October 3, 2017 02:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fbukevin/3a45c231a3e959fb3971ac7cfa2f7c4a to your computer and use it in GitHub Desktop.
Save fbukevin/3a45c231a3e959fb3971ac7cfa2f7c4a to your computer and use it in GitHub Desktop.
{
"Version":"2012-10-17",
"Statement": [
{
"Sid": "AllowUserToSeeBucketListInTheConsole",
"Action": ["s3:ListAllMyBuckets", "s3:GetBucketLocation"],
"Effect": "Allow",
"Resource": ["arn:aws:s3:::*"]
},
{
"Sid": "AllowRootAndHomeListingOfCompanyBucket",
"Action": ["s3:ListBucket"],
"Effect": "Allow",
"Resource": ["arn:aws:s3:::vcompany"],
"Condition":{"StringEquals":{"s3:prefix":["","/"],"s3:delimiter":["/"]}}
},
{
"Sid": "AllowListingOfUserFolder",
"Action": ["s3:ListBucket"],
"Effect": "Allow",
"Resource": ["arn:aws:s3:::vcompany"],
"Condition":{"StringLike":{"s3:prefix":["David/*"]}}
},
{
"Sid": "AllowAllS3ActionsInUserFolder",
"Effect": "Allow",
"Action": ["s3:*"],
"Resource": ["arn:aws:s3:::vcompany/David/*"]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment