Can't change region for bucket ... with no bucket specified

What is the problem you are having with rclone?

I have an S3 account configured as remote:

[foo-s3]
type = s3
provider = AWS
access_key_id = [REDACTED]
secret_access_key = [REDACTED]

In this account there are a number of S3 buckets in various regions.

When I try to size or ls everything in the account, I get a bunch of error messages:

2024/03/08 21:14:11 ERROR : S3 root: Can't change region for bucket "[REDACTED, bucket 1]" with no bucket specified
2024/03/08 21:14:12 ERROR : S3 root: Can't change region for bucket "[REDACTED, bucket 2]" with no bucket specified
2024/03/08 21:14:12 ERROR : S3 root: Can't change region for bucket "[REDACTED, bucket 3]" with no bucket specified
2024/03/08 21:14:12 ERROR : S3 root: Can't change region for bucket "[REDACTED, bucket 4]" with no bucket specified
...

Some buckets will be listed though and it seems it's only buckets in region us-east-1 that are working, all other buckets result in an error message.

Run the command 'rclone version' and share the full output of the command.

rclone v1.65.2
- os/version: Microsoft Windows 10 Pro 22H2 (64 bit)
- os/kernel: 10.0.19045.3930 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.21.6
- go/linking: static
- go/tags: cmount

Which cloud storage system are you using? (eg Google Drive)

AWS S3

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone size foo-s3:
rclone ls foo-s3:

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[foo-s3]
type = s3
provider = AWS
access_key_id = XXX
secret_access_key = XXX
### Double check the config for sensitive info before posting publicly

A log from the command that you were trying to run with the -vv flag

2024/03/08 21:32:15 DEBUG : Setting --config "[REDACTED]" from environment variable RCLONE_CONFIG="[REDACTED]"
2024/03/08 21:32:15 DEBUG : rclone: Version "v1.65.2" starting with parameters ["rclone" "size" "-vv" "foo-s3:"]
2024/03/08 21:32:15 DEBUG : Creating backend with remote "foo-s3:"
2024/03/08 21:32:15 DEBUG : Using config file from "[REDACTED]"
2024/03/08 21:32:16 ERROR : S3 root: Can't change region for bucket "[REDACTED]" with no bucket specified
2024/03/08 21:32:17 ERROR : S3 root: Can't change region for bucket "[REDACTED]" with no bucket specified
[...]
2024/03/08 21:32:35 ERROR : S3 root: Can't change region for bucket "[REDACTED]" with no bucket specified
2024/03/08 21:32:35 ERROR : S3 root: Can't change region for bucket "[REDACTED]" with no bucket specified
Total objects: 2.261k (2261)
Total size: 11.375 GiB (12214256526 Byte)
2024/03/08 21:32:36 DEBUG : 20 go routines active

Seems correct based on the docs:

Amazon S3 (rclone.org)

So, I would have to change the region in my config for each bucket? I assumed that was fixed with AWS S3 region auto-selection · Issue #2915 · rclone/rclone · GitHub.

Yes it is fixed but with an exception when you try to operate on the root:

so you can list all buckets (rclone lsd foo-s3:) and access any bucket ( rclone ls foo-s3:bucket) but you can not rclone ls foo-s3: if it contains buckets from regions different than defined (default us-east-1 in your case)

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