change the method for assuming s3