Make New Objects in S3 Bucket Public by Default

I have an s3 bucket in which the objects within it need to be made public, right now anytime I upload a new file I have to click on it and then click "make public using acl" I wonder if there is a way to set it so any new file uploaded to my bucket is public by default. I tried giving the bucket itself public permission but I still have to make the individual objects public too.

1 Answer

For details see the post How to Make All Objects in Amazon S3 Bucket Public by Default.

To resume:

  • Open the Properties for the bucket you want to make public

  • Click "Permissions"

  • Click "Edit bucket policy"

  • Copy and paste the following text:

      {
        "Version": "2012-10-17",
        "Statement": [
          {
            "Sid": "PublicReadGetObject",
            "Action": "s3:GetObject",
            "Effect": "Allow",
            "Resource": "arn:aws:s3:::",
            "Principal": "*"
          }
        ]
      }
    
  • Change test.h3xed.com to the actual name of your bucket

  • Click "Save".

Note: Users must still use the exact URL to your resources. They cannot view the "index" of your bucket or list its contents.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article
Twitter Facebook Pinterest