{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"s3:*"
],
"Effect": "Allow",
"Resource": ["arn:aws:s3:::{バケット名}/{フォルダ名}/*"]
},
{
"Action": [
"s3:ListBucket",
"s3:GetBucketLocation"
],
"Effect": "Allow",
"Resource": ["arn:aws:s3:::{バケット名}"],
"Condition": {
"StringLike": {
"s3:prefix": "{フォルダ名}/*"
}
}
},
{
"Action": [
"s3:ListAllMyBuckets",
"s3:GetBucketLocation"
],
"Effect": "Allow",
"Resource": ["arn:aws:s3:::*"]
},
{
"Action": [
"s3:ListBucket",
"s3:GetBucketLocation"
],
"Effect": "Allow",
"Resource": ["arn:aws:s3:::{バケット名}"],
"Condition": {
"StringEquals": {
"s3:prefix": [""]
}
}
},
{
"Action": [
"s3:ListBucket",
"s3:GetBucketLocation"
],
"Effect": "Allow",
"Resource": ["arn:aws:s3:::{バケット名}"],
"Condition": {
"Null": {
"s3:prefix": "true"
}
}
}
]
}