Tuesday, 4 May 2021

S3 file download using boto3


import boto3

import requests


access_key='key'

secret_access='key'

region = 'your-region'

s3 = boto3.client('s3', region_name=region, aws_access_key_id=access_key,

                                   aws_secret_access_key=secret_access)

 

s3.download_file('bucket','folder/file','download-destination')

print("downloaded")


No comments:

Post a Comment