Support

UNiTE, Remote CLI, eXtract Wizard

#28136 UNiTE : working with local jpa but not with S3 from AWS

Posted in ‘UNiTE and Remote CLI’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

PHP version
n/a
Tool
UNiTE
Tool version
n/a

Latest post by woluweb on Wednesday, 19 July 2017 10:57 CDT

woluweb
Hi,

I am a old user of Akeeba Backup and of S3 (I even made several times this presentation about how to best combine both https://www.slideshare.net/woluweb/joomla-akeeba-backup-and-amazon-s3), but I am a new user to UNiTE.

I use it on a local server (Xampp on WIN10) and it works fine with a local jpa (in the same folder as my xml file).
So I wanted to go to the next step and install directly from S3 in order to ease the monthly test of my backups... but I get the following error message...

(it is not an issue with the access keys, nor with the name of the bucket, as if I test with wrong access keys or bucket name, the error msg is explicit about that)

Apparently, the core of the error msg is
"Please use AWS4-HMAC-SHA256"
.
What can we do ?

Txs a lot,

Marc

Preparing to download s3://myREALbucket/myREALfile.jpa
PHP Fatal error:  Uncaught Aws\S3\Exception\InvalidRequestException: AWS Error Code: InvalidRequest, Status Code: 400, AWS Request ID: 97F3D548DD6CCF3B, AWS Error Type: client, AWS Error Message: The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256., User-Agent: aws-sdk-php2/2.8.1 Guzzle/3.9.3 curl/7.54.1 PHP/7.1.7
  thrown in C:\xampp\htdocs\akeeba_unite\vendor\aws\aws-sdk-php\src\Aws\Common\Exception\NamespaceExceptionFactory.php on line 91

Fatal error: Uncaught Aws\S3\Exception\InvalidRequestException: AWS Error Code: InvalidRequest, Status Code: 400, AWS Request ID: 97F3D548DD6CCF3B, AWS Error Type: client, AWS Error Message: The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256., User-Agent: aws-sdk-php2/2.8.1 Guzzle/3.9.3 curl/7.54.1 PHP/7.1.7
  thrown in C:\xampp\htdocs\akeeba_unite\vendor\aws\aws-sdk-php\src\Aws\Common\Exception\NamespaceExceptionFactory.php on line 91

nicholas
Akeeba Staff
Manager
Right now UNiTE only supports the Amazon S3 v2 API. Buckets created in newer Amazon data centers (IIRC Frankfurt and Sao Paolo, I may be missing another one) require the newer, v4 API. There are two reasons why this was not implemented yet.

First of all, the biggest drawback with the v4 API is that it's not sufficient to tell it which bucket you want to access. You have to explicitly state which region this bucket is in. We found this a bit confusing when you need to pull data from S3. We are trying to find a workaround. So far it seems that we need to do something undocumented: go through the us-east-1 location to get the bucket information(!) and use that to connect to the bucket with the v4 API.

Moreover, we have found several bugs in the official Amazon S3 SDK we are currently using in UNiTE. You may have noticed that in our other products (Akeeba Backup and ARS) we are using our own Amazon S3 SDK which has workarounds for these bugs. Arguably, fixing these bugs is extremely low on Amazon's list since they only seem to affect rather low quality shared hosts, i.e. not their target audience.

In any case, replacing the SDK in use is a big undertaking which takes time. Between Joomla's backwards compatibility breaks in Joomla! 3.7 and trying to launch a new site I didn't have the time to do that between April, when I planned on working on it, and now. Well, your ticket came at the perfect time. I have finally finished with these major time sinks which means that I can now focus on the time consuming tasks, such as replacing the S3 SDK in UNiTE :)

Meanwhile you will have to use a bucket in an Amazon region that supports the old, v2, API such as Ireland. Don't ask me for a solid ETA for the new UNiTE version. I will try to do it before the vacations period of the week of August 15. Emphasis on try. Barring any unforeseen issues beyond my control I should be able to release a new version of UNiTE by then.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

woluweb
Hi Nicholas,

Txs a *lot* for your very detailed answer, really.
Don't worry, I can survive a few days/weeks/even months without that new feature :)

But it is definitely an interesting feature and I will append my Slideshare presentation about Akeeba & S3 with a few slides about UNiTE as soon as the new version will be out.

Meanwhile, I have found a "workaround" : I download all my S3 backups via Cyberduck, so that I could locally install on my sites.

PS : does the unite.php still have any use ? It is mentionned in the Documentation, but when launching it, there comes a message asking for using restore-site.php

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!