Amazon S3 Public Buckets issue

I was getting an annoying error and I couldn’t figure out what the issue was.

The error was:

Action does not apply to any resource(s) in statement

I already allowed the bucket to be viewed publically and I tried to add the policy under Permissions.

I used the Policy Generator

iuseful aws policy generator
  • Changed the Type of Policy to S3 Bucket Policy
  • Allow
  • Principal I added * to allow all – wildcard
  • In the Actions dropdown, I selected GetObject
  • in ARN I copied and pasted the Resource id from the Edit Bucket Policy page.
  "Version": "2012-10-17",
  "Statement": [
      "Sid": "StmtNNNNNNNNNNNNNN",
      "Action": [
      "Effect": "Allow",
      "Resource": "arn:aws:s3:::bucket-name-here",
      "Principal": "*"

This is where I got stuck as it was not working. My static HTML site was not showing.

The policy does not add the /* after the resource address.

The resource should look like this:

"Resource": "arn:aws:s3:::bucket-name-here/*",

Similar Posts