Skip to content

Instantly share code, notes, and snippets.

@sdia-zz
Created July 24, 2018 08:38
Show Gist options
  • Save sdia-zz/0b0c3aab36b55279ab57c273efa3d8d2 to your computer and use it in GitHub Desktop.
Save sdia-zz/0b0c3aab36b55279ab57c273efa3d8d2 to your computer and use it in GitHub Desktop.
import boto3
S3 = boto3.resource('s3', region_name='us-west-2')
fpath = '/path/to/local/file/to/upload.txt'
s3_path = '/path/to/file/in/s3.txt'
s3_bucket = 'your-bucket-name'
S3.meta.client.upload_file(fpath, s3_bucket, s3_path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment