1
votes

I was simply following the "get started" tutorial here

But I failed at "Step 4 Add a Bucket Policy to Allow Public Reads". It always complains "access denied" with a red error icon.

I am not able to set it via command line either. Here is the command I use:

aws s3api put-bucket-policy --bucket bucket-name --policy file://bucket-policy.json

Here is the error I got:

An error occurred (AccessDenied) when calling the PutBucketPolicy operation: Access Denied

1
the policy u attached just provides a read access! are you doing anything other then reading from your bucket ?AppleCiderGuy
No. I am just going thru tutorial. I am not able to set policy.Xi 张熹
can paste the policy that you are setting here. also, can you make sure if u have replaced [YOUR_BUCKET_NAME] in arn:aws:s3:::[YOUR_BUCKET_NAME] with the correct bucket name ?AppleCiderGuy

1 Answers

6
votes

The issue was, you have to uncheck the boxes under permissions -> public access settings. Amazon failed to mention this in their tutorial. Bad tutorial.