Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make an S3 Bucket Permissions Public Access to 'Everyone' using CLI

How would I set the S3 Bucket Permissions for Public Access to 'Everyone' for Read Files using AWS CLI?

The documentation does not have clear specification of how to do this and have tried multiple variations. My end goal is to make the bucket a static site server bucket.

like image 598
James Marino Avatar asked Sep 03 '25 03:09

James Marino


1 Answers

S3 Bucket ACL permission are set after the bucket is created - I achieved a public file read bucket using this command

aws s3api put-bucket-acl --bucket ${SITE_NAME} --acl public-read

After creating the bucket:

aws s3api create-bucket --bucket ${SITE_NAME} --region ap-southeast-2 --create-bucket-configuration LocationConstraint=ap-southeast-2

like image 116
James Marino Avatar answered Sep 04 '25 19:09

James Marino