Created
November 7, 2018 13:04
-
-
Save jaklinger/2ed256016ee7af8569a89d457dc11cbf to your computer and use it in GitHub Desktop.
Write json to s3
This file contains hidden or 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 json | |
from io import StringIO | |
s3 = boto3.resource("s3") | |
data = [{"a":1, "c":3},{"b":2}] | |
s3_obj = s3.Object(<BUCKET NAME>, <FILE MAME>) | |
s3_obj.put(Body=json.dumps(data)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment