Primary Storage S3 Bucket

Hi,

I’m testing Nextcloud. I would like use S3 like primary storage. But I have a trouble Nextcloud only lets to create S3 Buckets on us-east-1 region. When I try another AWS region a I get this exception message:

“Exception: Creation of bucket failed. The unspecified location constraint is incompatible for the region specific endpoint this request was sent to.”

config.php:

‘objectstore’ => array(
‘class’ => ‘OC\Files\ObjectStore\S3’,
‘arguments’ => array(
‘bucket’ => ‘nextcloud.s3-eu-west-1.amazonaws.com’,
‘autocreate’ => true,
‘key’ => ‘X’,
‘secret’ => ‘X’,
‘hostname’ => ‘s3-eu-west-1.amazonaws.com’,
//‘port’ => 1234,
‘use_ssl’ => true,
‘region’ => ‘eu-west-1’,
// required for some non amazon s3 implementations
//‘use_path_style’=>true
),
),

Have anyone some idea what I am doing wrong?

Thanks!

Heres what we have that works, bucket is just the bucket name, not the whole path. Hope that helps!
array (
‘bucket’ => ‘nextcloudbucket’,
‘autocreate’ => true,
‘key’ => ‘XXXXXXXXXXXXXXXXXXXX’,
‘secret’ => ‘XXXXXXXXXXXXXXXXXXXXXXXXXX’,
‘hostname’ => ‘s3-us-gov-west-1.amazonaws.com’,
‘port’ => 443,
‘use_ssl’ => true,
‘region’ => ‘us-gov-west-1’,
‘use_path_style’ => true,
),

1 Like

Great! Thank you so much!