Using AWS CLI, how to add customize metadata headers to the all S3 objects at once?

Viewed 2436

Using AWS CLI, to add cache control and expire header

I have used the command:

aws s3 cp s3://mybucket/ s3://mybucket/ --recursive --metadata-directive REPLACE --expires 2034-01-01T00:00:00Z --acl public-read --cache-control max-age=2592000,public

But, due to this my existing tags got replaced and to some objects in my S3 bucket, they also had custom metadata header like "x-amz-meta-s3b-last-modified:20170209T042854Z"

So, now if I need to add it again. How can I do that?

0 Answers
Related