1 Answers
I think the list bucket action doesn’t apply to the contents in the bucket, you can remove it from your statement, and create another statement allows the list bucket action applies on your bucket.
Sign Up Free or Log In to participate!
I am trying to create a bucket policy using a policy generator. It’s showing me an error(‘Action does not apply to any resource(s) in the statement’).
{
"Id": "Policy1561371654404",
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1561371647408",
"Action": [
"s3:DeleteBucket",
"s3:GetObject",
"s3:ListBucket"
],
"Effect": "Allow",
"Resource": "arn:aws:s3:::myfirstbucketpolicy/*",
"Principal": {
"AWS": [
"arn:aws:iam::111111111111:user/John"
]
}
}
]
}
I think the list bucket action doesn’t apply to the contents in the bucket, you can remove it from your statement, and create another statement allows the list bucket action applies on your bucket.
Psst…this one if you’ve been moved to ACG!
ListBucket and DeleteBucket requiere a Bucket resource type.