Amazon S3 backup destination fails with the new "account regional namespace" buckets

Hi all,

I just set up an AWS S3 bucket as a backup destination for one of my NS8 clusters and ran into something that might hit others soon, so here’s what I found.

Since March 2026 the AWS console offers a “Bucket namespace” option when you create a bucket, and “Account Regional namespace (recommended)” is the suggested one. If you go with it, AWS appends -<account-id>-<region>-an to the bucket name. I didn’t pay much attention to it at first and ended up with exactly such a bucket in eu-north-1.

Adding it with the “Amazon S3” provider in NS8 failed on all three nodes with no_read_permission. Credentials and IAM policy were fine. When I ran rclone by hand against the bucket, s3.amazonaws.com gave me a 403 AccessDenied on ListObjectsV2, while s3.eu-north-1.amazonaws.com worked right away. Turns out AWS documents this: buckets in the account regional namespace need the regional endpoints, the global one only works for them in us-east-1 (Namespaces for general purpose buckets - Amazon Simple Storage Service). And the “Amazon S3” provider in NS8 always uses s3.amazonaws.com – it’s hard-coded as repoPrefix in AddRepositoryModal.vue and ends up as endpoint in the rclone config.

I also tried “S3 compatible provider” with the regional endpoint, no luck there either. That form has no region field, so NS8 writes provider = Other without a region. Didn’t dig deeper into that one.

What finally worked was the “Rclone-compatible provider” with this config and the bucket name as Path:

type = s3
provider = AWS
env_auth = false
access_key_id = <key id>
secret_access_key = <secret>
region = eu-north-1
endpoint = s3.eu-north-1.amazonaws.com
no_check_bucket = true

Without no_check_bucket = true the read check passed but the write check failed with no_write_permission. My guess is that rclone tries CreateBucket on mkdir, and my IAM user isn’t allowed to do that (only List/GetBucketLocation on the bucket and Get/Put/Delete on the objects). Haven’t verified that, but with the option set validation passes and the first backup ran fine.

So two suggestions:

  • Could the “Amazon S3” provider build the endpoint from the region field (s3.<region>.amazonaws.com) instead of using the global one? AWS recommends regional endpoints anyway.
  • Maybe set no_check_bucket = true for AWS too, like it’s already done for Synology and IDrive, so least-privilege IAM users work out of the box.

And a small side note: the validation error (“Cannot connect, authenticate, or read …”) doesn’t tell you which of the three it is. I also couldn’t get any rclone output out of podman exec rclone-gateway rclone … – neither on the terminal nor in the journal – so I ended up testing with the official rclone image. Having the actual rclone error somewhere would have saved me quite some time.

Somewhat related: Backup - S3 server : LocationConstraintConflict: The location constraint differs from the location you are trying to access

good luck,
Thorsten

The regional endpoint requirement for AWS S3 account regional namespace buckets is an important finding. Using the Rclone-compatible provider with the correct region, endpoint, and no_check_bucket = true seems like a useful workaround for environments with restricted IAM permissions. It would be great to see NS8 support regional endpoints automatically and provide more detailed validation errors to simplify troubleshooting. This could save other administrators a lot of time.

[Comment generated with AI]

Hi Thorsten, thanks for the thorough analysis and for sharing the workaround!

You’re right on both points, so we treated them as a bug: Amazon S3 backup fails with account regional namespace buckets · Issue #8241 · NethServer/dev · GitHub

  • Regional endpoint: the “Amazon S3” provider will build the endpoint from the region field (s3.<region>.amazonaws.com) instead of always using the global one. Existing destinations keep working.
  • Least-privilege IAM users: NS8 will set no_check_bucket = true for AWS, as it already does for Synology and IDrive, so the bucket must already exist and no CreateBucket permission is needed.
  • rclone output: you couldn’t see any rclone output because the rclone-gateway image sends rclone’s logs to journald. The socket rclone needs isn’t available inside the container, so the messages are silently lost. We’ll make them visible in the task log and system logs, and when you run rclone by hand with podman exec.
  • Write check: the validation currently creates and removes a test directory. On S3, directories don’t really exist, so that check proves little. We’ll replace it with a real write: create a small temporary file, then delete it.

Clearer error messages in the UI are a bigger change, so they have their own feature request: Show clearer backup destination errors · Issue #8242 · NethServer/dev · GitHub
The idea is to show rclone’s actual error, with secrets removed, and to tell apart the most common causes, such as connection failed, wrong credentials, bucket not found, and wrong region or endpoint.

Until the fix is released, your “Rclone-compatible provider” configuration is the recommended workaround.

Please.

If the answer is not written but generated should be specified on top, near the “declared” author.