s5cmd
s5cmd copied to clipboard
remote-to-remote copy with --if-source-newer uses wrong region
> s5cmd cp --if-source-newer --source-region eu-central-1 --destination-region eu-west-1 s3://<bucket-in-eu-central-1>/key s3://<bucket-in-eu-west-1>/key
ERROR "cp *** ***": BucketRegionError: incorrect region, the bucket is not in 'eu-west-1' region at endpoint '', bucket is in 'eu-central-1' region status code: 301, request id: ***, host id: ***
Seems like the destinatio-region overrides the region in doCopy just before calling shouldOverride
which HEADs the source bucket.