S3 access refactor

Logics have been centralised:

* region to hostname
* url generation
* signature

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