Cannot connect to Amazon S3

Nextcloud version (eg, 10.0.2): 12.0.1
Operating system and version (eg, Ubuntu 16.04): Ubuntu 16.04 64bit
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4
PHP version (eg, 5.6): PHP 7
Is this the first time you’ve seen this error?: No

The issue you are facing:
I am trying to connect AWS as external storage. I have entered the name of the bucket I have created in AWS. I have also entered the access and secret key and specified the region (eu-west-1). Checked use SSL but when I click the tick I get a red square.

The output of your Nextcloud log in Admin > Logging:
Error files_external Exception: Creation of bucket failed. The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256. 2017-08-10T13:09:53+0100
Error files_external Aws\S3\Exception\InvalidRequestException: The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256. 2017-08-10T13:09:53+0100

Its the problem with the different versions.

Try to add to config.php:

‘signature’ => ‘v4’,
‘region’ => ‘eu-central-1’, //for bucket stored in Frankfurt

I use S3 as prímary storage.