37 lines
966 B
JSON
37 lines
966 B
JSON
{
|
|
"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:::my-company"],
|
|
"Condition": {
|
|
"StringEquals": {
|
|
"s3:prefix": ["", "home/", "home/User"],
|
|
"s3:delimiter": ["/"]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Sid": "AllowListingOfUserFolder",
|
|
"Action": ["s3:ListBucket"],
|
|
"Effect": "Allow",
|
|
"Resource": ["arn:aws:s3:::my-company"],
|
|
"Condition": { "StringLike": { "s3:prefix": ["home/User/*"] } }
|
|
},
|
|
{
|
|
"Sid": "AllowAllS3ActionsInUserFolder",
|
|
"Effect": "Allow",
|
|
"Action": ["s3:*"],
|
|
"Resource": ["arn:aws:s3:::my-company/home/User/*"]
|
|
}
|
|
]
|
|
}
|