Use #service instead of the deprecated #connection in the tests
S3 access refactor

Logics have been centralised:

* region to hostname
* url generation
* signature

During the process a couple of inconsistencies have also
been fixed.