How to make 10,000 files in S3 public

前端 未结 9 955
梦如初夏
梦如初夏 2020-12-04 07:07

I have a folder in a bucket with 10,000 files. There seems to be no way to upload them and make them public straight away. So I uploaded them all, they\'re private, and I ne

9条回答
  •  攒了一身酷
    2020-12-04 07:37

    Using the cli:

    aws s3 ls s3://bucket-name --recursive > all_files.txt && grep .jpg all_files.txt > files.txt && cat files.txt | awk '{cmd="aws s3api put-object-acl --acl public-read --bucket bucket-name --key "$4;system(cmd)}'

提交回复
热议问题