S3 Policy is invalid. Action is not applicable to any resource in the statement
Applies to
NetApp StorageGRID
Issue
When trying to configure a bucket policy in StorageGRID, it reports:
"S3 Policy is invalid. Action is not applicable to any resource in the statement: s3:ListBucket"
"S3 Policy is invalid. Action is not applicable to any resource in the statement: s3:ListAllMyBuckets"
Example of above policy is for ListBucket and ListAllMyBuckets specifically, but can apply to other statements.
Example of statement where this error is reported:
{
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:DeleteObject",
"s3:DeleteObjectTagging",
"s3:GetObject",
"s3:GetObjectTagging",
"s3:PutObject",
"s3:PutObjectTagging",
],
"Resource": "arn:aws:s3:::<bucketname>/*"
}
]
}