set s3 endpoint for puts based on region code of bucket