How to download a file from S3 buckets using boto3

0 votes

Hi Guys,

I am new to the S3 bucket. I want to download files from a specific bucket using boto3. How can I do that?

Oct 8, 2020 in AWS by akhtar
• 38,260 points
8,268 views

1 answer to this question.

0 votes

Hi@akhtar,

Boto3 supports upload_file() and download_file() APIs to store and retrieve files to and from your local file system to S3. 

import boto3
s3 = boto3.client('s3')
s3.download_file(Bucket='bucket_name',key='abc.txt',Filename='abc.txt')
answered Oct 8, 2020 by MD
• 95,460 points

Related Questions In AWS

0 votes
1 answer

How to download the latest file in a S3 bucket using AWS CLI?

You can use the below command $ aws ...READ MORE

answered Sep 6, 2018 in AWS by Archana
• 4,170 points
19,884 views
0 votes
1 answer
0 votes
1 answer

How can I return XML from boto calls?

I don't think there's an officially supported ...READ MORE

answered Jul 20, 2018 in AWS by Cloud gunner
• 4,670 points
1,481 views
+1 vote
2 answers

How to read a csv file stored in Amazon S3 using csv.DictReader

The code would be something like this: import ...READ MORE

answered Oct 25, 2018 in AWS by Archana
• 5,640 points
54,455 views
+1 vote
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP