Last active
May 2, 2021 13:17
-
-
Save borja-munoz/dcf0df93f5a22a072724ab7e16f0ad29 to your computer and use it in GitHub Desktop.
Upload file to AWS S3 bucket
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 logging | |
import boto3 | |
from botocore.exceptions import ClientError | |
s3_client = boto3.client('s3') | |
try: | |
response = s3_client.upload_file(file_name, bucket, file_name) | |
except ClientError as e: | |
logging.error(e) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment