s5cmd icon indicating copy to clipboard operation
s5cmd copied to clipboard

remote-to-remote copy with --if-source-newer uses wrong region

Open benzaita opened this issue 10 months ago • 0 comments

> 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.

benzaita avatar Mar 26 '24 09:03 benzaita