Mounting Existing Amazon S3 Bucket?

From what I’ve read here in the forums, it seems that it is not possible to mount an existing Amazon S3 bucket as external storage. Are there any plans to make this a feature later on?
I ask because I have a server that sends all backups to an S3 bucket and I would like to attach that bucket to store everything locally as well. Also, if something were to happen to my NexCloud installation and I have to start over, I wouldn’t be able to remount that bucket that was created by NextCloud. I would have to reconfigure everything and seems like a big headache if something goes wrong in the future.

In this report it looks like it used to work:

So I suppose this will be fixed at some point but I can’t tell you when. If you know to code, you can perhaps help out a bit, if not you can at least help testing and providing details if required.

1 Like

Is there anybody actively working on this piece of NC or is there something that requires testing? I’m happy to test if needed.

The NC External Storage application allows you to mount external storage services, such Amazon S3. How-to at https://docs.nextcloud.com/server/12/admin_manual/configuration_files/external_storage_configuration_gui.html

Related storage backend with Amazon S3 at https://docs.nextcloud.com/server/12/admin_manual/configuration_files/external_storage/amazons3.html

1 Like

I know it’s a old discussion. But I am able to mount the existing S3 storage bucket just fine.

which version did you use? It always tries to create a new bucket for me

I’m still having this issue. Experienced on both v24 and v25.

What I’ve noticed is Nextcloud keeps trying to create a bucket in eu-west-1. My bucket is in us-east-1. My guess is Nextcloud looks for the bucket in eu-west, doesn’t find it, then tries to create a new bucket. But, bucket names are globally unique, so that’s why AWS returns the error.

I’m trying to use the “region” field in the files_external settings, but it doesn’t seem to have any effect. I’m not sure if there’s some other region naming scheme I’m supposed to be using other than “us-east-1”.

I would’ve added this comment to the GitHub issue linked above, but OP in that issue seems to be experiencing an auth error, meanwhile I’m unsurprisingly seeing a “409 conflict”.

Update - after playing with the settings and retrying over and over, it randomly worked. No clue why it suddenly started working.
However, it does mean that for anyone using S3 outside “eu-west-1”, consider the “region” field mandatory. I used the standard AWS region format in lowercase, ie us-east-1.

Update 2 - I created a GitHub issue. After looking at the source code - if you don’t supply the region, Nextcloud always defaults to “eu-west-1”. So, connecting to pre-existing buckets outside of “eu-west-1” will always fail unless region is supplied. [Bug]: files_external with AmazonS3 does not find pre-existing buckets outside eu-west-1 · Issue #35926 · nextcloud/server · GitHub

1 Like