def upload(self, local_file, s3_path=None):
if not os.path.exists(local_file):<EOL><INDENT>raise Exception(local_file + "<STR_LIT>")<EOL><DEDENT>if s3_path is None:<EOL><INDENT>s3_path = os.path.basename(local_file)<EOL><DEDENT>bucket = self.info['<STR_LIT>']<EOL>prefix = self.info['<STR_LIT>']<EOL>self.logger.debug('<STR_LIT>')<EOL>s3conn = self.client <EOL>self.logger.debug('<STR_LIT>'.format(local_file))<EOL>s3conn.upload_file(local_file, bucket, prefix+'<STR_LIT:/>'+s3_path)<EOL>self.logger.debug('<STR_LIT>')<EOL>return '<STR_LIT>'.format(bucket, prefix, s3_path)<EOL>
Upload files to your DG S3 bucket/prefix.

Args:
    local_file (str): a path to a local file to upload, directory structures are not mirrored
    s3_path: a key (location) on s3 to upload the file to

Returns:
    str: s3 path file was saved to

Examples:
    >>> upload('path/to/image.tif')
    'mybucket/myprefix/image.tif'

    >>> upload('./images/image.tif')
    'mybucket/myprefix/image.tif'

    >>> upload('./images/image.tif', s3_path='images/image.tif')
    'mybucket/myprefix/images/image.tif'