How to set expires headers to all images in a bucket in Amazon S3
问题 We have around 10,000+ images in a bucket in Amazon S3, how can I set the expires header on all of the images in one go? 回答1: Just a heads up that I found a great solution using the AWS CLI: aws s3 cp s3://bucketname/optional_path s3://bucketname/optional_path --recursive --acl public-read --metadata-directive REPLACE --cache-control max-age=2592000 This will set the Cache-Control for 30 days. Note that you have the option to copy or replace the previous header data. Since AWS will