awsboto3
AWS and boto3 recipes for PythonYour AWS access and secret keys must be stored as environment variables as specified in the boto documentation
Library: boto3
Shortcut: aws.s3
import boto3
def upload_file(local_path, remote_name):
"""
Upload a file to S3
:param local_path: local path to the file
:param remote_name: path on the local bucket
"""
client = boto3.client('s3',
region_name='aws_region', #AWS region
aws_access_key_id="access_key",
aws_secret_access_key="secret_key")
client.upload_file(local_path, "bucket_name", remote_name)