added support for custom endpoints in s3