Reputation: 179
Description:
Hi, I am trying to ssh a linux server and from that I am trying to upload a file to S3 bucket using AWS cli, and its working fine.
AWS S3 cp /path/to/file s3://sample_bucket --profile=user1
Problem:
But while uploading the file, i want to make that file public too. Is there any command to make the file public, if so then please correct the above given command.
Upvotes: 14
Views: 7595
Reputation: 1726
You can set the Access Control List (ACL) while copying an object. So your command would become.
aws s3 cp /path/to/file s3://sample_bucket --acl public-read
You'll also want to check the buckets Permissions tab and review the Manage public access control lists (ACLs) settings.
Upvotes: 31