M HYPE SPLASH
// news

make new objects in s3 bucket public by default

By Sarah Scott

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 postHow 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

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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