resource = boto3.resource(service_name='s3', endpoint_url='http://localhost')
resource.meta.client.meta.events.unregister('before-sign.s3', fix_s3_host)
Overwrite S3 endpoint using Boto3 configuration file