BucketRegionError

Hello All,

I’ve created a Bucket in the S3 Region ap-southeast-2 - Asia Pacific Sydney. I’ve configured rclone to use this region and location restriction but I’m still getting the following error:

BucketRegionError: incorrect region, the bucket is not in ‘ap-southeast-2’ region

In the S3 console it specifies the Asia Pacific Sydney region and I made sure to select that when I created the bucket.

Any help with this would be greatly appreciated.

What does your config look like (redact the secret bits)?

I tried with config like this and it seemed to work

[TestS3]
type = s3
access_key_id = XXX
secret_access_key = XXX
region = ap-southeast-2
location_constraint = ap-southeast-2

Thanks for the quick response…

Here’s the config:

[s3backups]
type = s3
env_auth =
access_key_id = xxxxxxx
secret_access_key = xxxxxxx
region = ap-southeast-2
endpoint =
location_constraint = ap-southeast-2
acl = private
server_side_encryption =
storage_class =

The interesting thing is that I’m only getting an error when I attempt the “rclone sync” command. If I attempt a “rclone ls” command I can list the directory contents. Although it does generate an Error: Entry doesn’t belong in directory “test folder” (same as directory) - ignoring.

The actual error I’m receiving is:

ERROR : : error reading destination directory: BucketRegionError: incorrect region, the bucket is not in 'ap-southeast-2' region status code: 301, request id: , host id:

The IAM user I’ve created has the required permissions:

ListBucket
DeleteObject
GetObject
PutObject
PutObjectACL

Again… Any help is greatly appreciated.

Your config looks OK. Try removing the bucket and re-creating it - maybe it got created in a different region by accident? rclone rmdir s3:bucket to remove an empty bucket. or rclone purge s3:bucket to remove the contents and the bucket. Then use rclone mkdir s3:bucket to re-create the bucket. Or you could create a new one to test with.

I’m getting an error trying to delete the bucket using the rmdir command.

Attempt 1/3 failed with 1 errors and: AccessDenied: Access Denied

Here is the IAM Policy that the user has:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Stmt11111111111111",
            "Effect": "Allow",
            "Action": [
                "s3:DeleteObject",
                "s3:GetObject",
                "s3:ListBucket",
                "s3:PutObject",
                "s3:PutObjectAcl"
            ],
            "Resource": [
                "arn:aws:s3:::BUCKETNAME/*",
                "arn:aws:s3:::BUCKETNAME"
            ]
        }
    ]
}

I don’t see Remove bucket in your ACL.