original file should be s3://bucketname/path/to/file.txt

    returns a Buffer with the file in it

def get_file(original_file):
    """
    original file should be s3://bucketname/path/to/file.txt

    returns a Buffer with the file in it
    """
    import cStringIO
    import boto3
    s3 = boto3.resource('s3')
    bucket_name, object_key = _parse_s3_file(original_file)
    logger.debug("Downloading {0} from {1}".format(object_key, bucket_name))
    bucket = s3.Bucket(bucket_name)
    output = cStringIO.StringIO()
    bucket.download_fileobj(object_key, output)
    output.reset()
    return output