peak / s5cmd

Parallel S3 and local filesystem execution tool.
MIT License
2.71k stars 239 forks source link

Copying object onto itself with metadata fails #711

Closed arosu closed 4 months ago

arosu commented 8 months ago

Running the following:

s5cmd cp --metadata "md5sum=xyz" s3://path/to/object s3://path/to/object

Fails with:

ERROR "cp s3://path/to/object s3://path/to/object": InvalidRequest: This copy request is illegal because it is trying to copy an object to itself without changing the object's metadata, storage class, website redirect location or encryption attributes. status code: 400, request id: abc, host id:

Even though I definitely am changing the object's metadata.