Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

upload file to aws

# easy way
import boto3

s3 = boto3.resource(
    service_name='s3',
    region_name='Your region',
    aws_access_key_id='Your id',
    aws_secret_access_key="Your Key")

bucket = s3.Bucket('your bucket name')

bucket.upload_file(Filename='temp.csv', Key='temp.csv')
# file path __________↑                 ↑ 
# (which you want to upload)            |
#                                       |______path (where you want to upload inside bucket)

Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #upload #file #aws
ADD COMMENT
Topic
Name
8+3 =