AWS S3 version switching automatically for cli but not for RC mode

Hello Experts,

I have an remote to connect aws s3 bucket:
[s3remoteenvauth]
type = s3
access_key_id =
env_auth = true
provider = aws
secret_access_key =
no_check_bucket = true

I have not set any region in remote and the bucket I am trying to access is in ap-south-1 region.
When I execute copy command directly though command line mode with above remote it works fine but with below message -

/data # rclone copy local:/config/rclone/rclone.conf O9DataLake-5853-qa_o9dlmi5-c5292605-8d6c-4fc9-bd48-78e3770d00f2:/o9dl-awsgq10113/xyz/mh02
2023/06/26 18:00:40 NOTICE: s3: s3 provider "aws" not known - please set correctly
2023/06/26 18:00:40 NOTICE: S3 bucket o9dl-awsgq10113 path xyz: Switched region to "ap-south-1" from "us-east-1"

But if I try file copy over an api with RCD mode it throws error and does not copy data -
Error says something related wrong region.
(In rc mode I got this error while using multipart file upload rclone api)

Rclone version : v1.62.2

Thanks
Mahendra

Can you run rclone rcd -vv with and post the log it produces please?

Thanks for the reply

Rclone logs :

2023/06/27 08:51:58 ERROR : o9dl-awsgq10113/qa.o9dlmi5/mibulkinsert/2023-06-27-08/mie49e3282-2244-4930-987c-76d597c614c2.json: Failed to copy: BucketRegionError: incorrect region, the bucket is not in 'us-east-1' region at endpoint '', bucket is in 'ap-south-1' region
status code: 301, request id: 1165YRQ6R5A512F6, host id: j1MMmYPA43BimiEpJY40NiEMPJgRdymyn9ffZdOUaMSzehII9CQv1uHAeK08MOTp+2Bu6IDivLQ=
2023/06/27 08:51:58 ERROR : rc: "operations/uploadfile": error: BucketRegionError: incorrect region, the bucket is not in 'us-east-1' region at endpoint '', bucket is in 'ap-south-1' region
status code: 301, request id: 1165YRQ6R5A512F6, host id: j1MMmYPA43BimiEpJY40NiEMPJgRdymyn9ffZdOUaMSzehII9CQv1uHAeK08MOTp+2Bu6IDivLQ=

Response from /operations/uploadfile

multipartupload.status.message
HTTP/1.1 500 Internal Server Error

multipartupload.status.message.body
{ "error": "BucketRegionError: incorrect region, the bucket is not in 'us-east-1' region at endpoint '', bucket is in 'ap-south-1' region\n\tstatus code: 301, request id: PGA0PP26NT5MYSRT, host id: u5LIrIo6QGbieC3BGaP+lcJgDKZCqv++F2RNCDcGZ7wdqnL8WdBsxUqQ2K9Nnmx4V5qI6O6BiqA=", "input": { "fs": "O9DataLake-5853-qa_o9dlmi5-c5292605-8d6c-4fc9-bd48-78e3770d00f2:", "remote": "o9dl-awsgq10113/qa.o9dlmi5/mibulkinsert/2023-06-27-08" }, "path": "operations/uploadfile", "status": 500 }

Can you post more of the log please? I need to see the DEBUG logs from the point the rc transaction started to it ended with the ERROR - thanks! If not sure post more log rather than less :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.