Skip to content

Instantly share code, notes, and snippets.

@nekojaxa
Last active July 27, 2016 14:28
Show Gist options
  • Save nekojaxa/926c32feccafb2cf9192f31512b52c19 to your computer and use it in GitHub Desktop.
Save nekojaxa/926c32feccafb2cf9192f31512b52c19 to your computer and use it in GitHub Desktop.
import boto3
s3 = boto3.resource('s3')
bucket = s3.Bucket('test.test.test.3')
print(bucket.name)
obj = bucket.Object('test.txt')
body ="Helloworld."
response = obj.put(
Body=body.encode('utf-8'),
ContentEncoding='utf-8',
ContentType='text/plane'
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment