can use either version 2 or version 4 signatures
refactor S3 calls