S3 as default storage NC Ver12.04

s3
nc12
external_storage

#1

Hello,
We currently have installed Next cloud 12.0.4.3 installed
I recently learned that now Nextcloud 12.04 it’s possible to mount S3 as its main/default storage, I followed the doc and configured the s3 as recommended, but I get error as shown below.
any setting i am missing, is it possible at all ?
please advice
Thanks

<?php
$CONFIG = array (
  'instanceid' => 'oc6lrineym6z',
  'passwordsalt' => 'password',
  'secret' => 'passwordo',
  'trusted_domains' => 
  array (
    0 => '172.18.12.221',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'overwrite.cli.url' => 'http://172.18.12.221/nextcloud',
  'dbtype' => 'mysql',
  'version' => '12.0.4.3',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nc_user',
  'dbpassword' => 'PASSWORD',
  'installed' => true,
  'objectstore' => array(
	  'class' => 'OC\\Files\\ObjectStore\\S3',
	  'arguments' => array(
		  'bucket' => 'sandbox',
		  'key' => 'my key',
		  'secret' => 'my secret',
		  'hostname' => 's3-us-west-2.amazonaws.com',
		  'use_ssl' => true,
	  ),
  ),
);

The error

Internal Server Error

    The server encountered an internal error and was unable to complete your request.
    Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
    More details can be found in the server log.

#2

you can only use S3 as main storage in a new installation.

You need to install nextcloud, launch the setup page, then leave it (don’t touch anything, even the admin email address), edit the config file to include your bucket details and then go back to setup and continue as normal.