Skip to content

Instantly share code, notes, and snippets.

@urigoren
Created April 30, 2018 13:40
Show Gist options
  • Select an option

  • Save urigoren/18d8eb6f6d63db52f2dc8a9f6d01345f to your computer and use it in GitHub Desktop.

Select an option

Save urigoren/18d8eb6f6d63db52f2dc8a9f6d01345f to your computer and use it in GitHub Desktop.
import json, boto3
s3 = boto3.resource("s3").Bucket("bucket")
json.load_s3 = lambda f: json.load(s3.Object(key=f).get()["Body"])
json.dump_s3 = lambda obj, f: s3.Object(key=f).put(Body=json.dumps(obj))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment