Add support for S3-compatible object storage 

Change S3 endpoint variables to be dynamic.