Cannot access S3 buckets in other regions using mount command

What is the problem you are having with rclone?

Hello Everyone,

I'm have mount a network disk that point to my s3 buckets, it works well but i cannot access others buckets that are in different regions.

I saw in a topic that there is an auto-detection of buckets regions but i don't know how to implement it for mount command, and i see that rclonebrowser works well with the sam rclone.conf file

For information, the command $rclone ls demo:bucket-eu-west-3 works, and also the command bellow where it says that rclone has swtiched the region:

$rclone lsd demo:bucket-eu-west-3
2025/03/06 12:36:37 NOTICE: S3 bucket bucket-eu-west-3 Switched region to "eu-west-3" from "eu-west-1"
           0 2000-01-01 01:00:00        -1 test

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

$rclone version
rclone v1.69.0
- os/version: Microsoft Windows 11 Enterprise 23H2 23H2 (64 bit)
- os/kernel: (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.23.4
- go/linking: static
- go/tags: cmount

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

I'm using AWS s3 service.

Please run 'rclone config redacted' and share the full output.

Here the content of rclone.conf :

$rclone config redacted
[demo]
type = s3
provider = AWS
env_auth = true
access_key_id = XXX
secret_access_key = XXX
region = eu-west-1
profile = demo

Thank you in advance

Given that you say that something does not work it has limited value to post only information about what works:)

The same about your mount command details...

And maybe some log to show what "does not work" mean?

i mean that when i run this command rclone mount demo: C:\s3 --vfs-cache-mode full --poll-interval 5s i can access only the buckets that are in eu-west-1 only, when i try to access the buckets in other regions i get "empty folder" in Explorer even if they contains a lots of folder/files in S3

when i enter a bucket in eu-west-3 i got this logs in rclone :
ERROR : S3 root: Can't change region for bucket "xxxxxx" with no bucket specified

Any solution please ?

Try to remove this option from your config maybe?

for simplify testing, remove env_auth

not sure the logic of telling rclone to use environment variables and then explicitly hardcode the key+id in the config file.

thanks, but still not working by removing region = eu-west-1, i get the same error but for all buckets: ERROR : S3 root: Can't change region for bucket "xxxxxx" with no bucket specified

Could you check if it works with rclone v1.67.0 please? You can download it here.

In v1.68.0 AWS SDK was upgraded and multiple things broke. Most is already fixed but maybe this is yet another one remaining.

i see, but still not working :

rclone version
rclone v1.67.0
- os/version: Microsoft Windows 11 Enterprise 23H2 (64 bit)
- os/kernel: 1xxxx (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.22.4
- go/linking: static
- go/tags: cmount

logs:

2025/03/08 10:54:09 ERROR : S3 root: Can't change region for bucket "xxxxxx" with no bucket specified

any news please ? i think rclone does not support the auto-selection of the s3 region in mount command

each s3 remote has a specific endpoint pointing to a specific region.


as a possible workaround

  1. create a remote for each region
  2. combine all the remotes using a combine remote

thank you for your answer, yes i already did it and it worked, but it's not efficient, and in each mount(region) you can see all the buckets, you don't see only the buckets of the current region, because rclone needs s3:ListAllMyBuckets permission which list all the existent buckets in the AWS account.

might try a policy. for example

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "s3:ListAllMyBuckets",
      "Resource": "arn:aws:s3:::*"
    }
  ]
}

i ran the command with --dump=headers and notice that the provider is running 301

here is a snippet.

  1. rclone requests s3.us-east-2.wasabisys.com
  2. provider returned 301 including the correct region X-Amz-Bucket-Region: eu-west-3
  3. rclone, based on the 301 could change the region on the fly, but does not.
DEBUG : HTTP REQUEST (req 0xc00057e3c0)
DEBUG : HEAD /zork.london/file.ext HTTP/1.1
Host: s3.us-east-2.wasabisys.com

DEBUG : HTTP RESPONSE (req 0xc00057e3c0)
DEBUG : HTTP/1.1 301 Moved Permanently
X-Amz-Bucket-Region: eu-west-3

then i searched the forum for 301 and found
https://forum.rclone.org/t/why-s3-backend-ignores-http-301-errors/42016


and there is a github issue about it
https://github.com/rclone/rclone/issues/5066

1 Like