Add support for S3-compantible object storage 

Change S3 endpoint variables to be dynamic.