How to make all Objects in AWS S3 bucket public by default?

Go to http://awspolicygen.s3.amazonaws.com/policygen.html
Fill in the details such as: enter image description here
In Action select “GetObject”
Select “Add Statement”
Then select “Generate Policy”

Copy the text example:

{
  "Id": "Policy1397632521960",
  "Statement": [
    {
      "Sid": "Stmt1397633323327",
      "Action": [
        "s3:GetObject"
      ],
      "Effect": "Allow",
      "Resource": "arn:aws:s3:::bucketnm/*",
      "Principal": {
        "AWS": [
          "*"
        ]
      }
    }
  ]
}

Now go to your AWS S3 console, At the bucket level, click on Properties, Expand Permissions, then Select Add bucket policy. Paste the above generated code into the editor and hit save.

All your items in the bucket will be public by default.

Leave a Comment