I use s3p
to deal with large number of files on Amazon s3. I would like to set cache-control for the files I have copied. I tried:
s3p cp --bucket my-bucket --to-bucket my-bucket --cache-control max-age=31536000,private --prefix path/to/copy/src/ --to-prefix path/to/copy/dst/
This did not add cache control to the files in s3://my-bucket/path/to/copy/dst/
. Here I read about aws-cli:
NOTE: By default, aws-cli only copies a file's current metadata, EVEN IF YOU SPECIFY NEW METADATA.
So, I try:
s3p cp --bucket my-bucket --to-bucket my-bucket --cache-control max-age=31536000,private --metadata-directive REPLACE --prefix path/to/copy/src/ --to-prefix path/to/copy/dst/
This command doesn't return any error either, but my cache control is not set in s3://my-bucket/path/to/copy/dst/
How can I use s3p cp
and set cache-control of the destination?