This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
import gzip | |
from StringIO import StringIO | |
def get_contents_as_string(bucket, key_prefix, | |
aws_access_key_id=None, aws_secret_access_key=None): | |
"""Gets the contents as string from a gzipped file on s3 | |
Yeah, it's all in memory, so not a good solution for large objects. |