TECHIES WORLD

For Techs.... Techniques.... Technologies....

AWSBashLinux

How to upload objects to S3 bucket and grant public access using aws cli

We can upload the objects to S3 bucket using aws cli. But the newly uploaded object do not have the public access unless there is custom policy attached to the bucket.

Aws cli provides an option to make the object as public during upload.

#aws s3 cp FILE s3://BUCKET/ --acl public-read

Where FILE and BUCKET need to be replaced with the name of the file and name of the S3 bucket respectively.

That's all…