Moving amazon s3 code to utilities