Multipart file download from s3

0 votes
I have uploaded a file to s3 bucket with multipart,

what is the procedure to download it using shell script?
Sep 13, 2020 in Cloud Computing by Raj
• 120 points
2,142 views

1 answer to this question.

0 votes

Hi@Raj,

There are multiple ways to download a file from the s3 bucket. You can use aws cli command in your script. Or you can use the boto module. The Boto module will connect to AWS API internally. you can take help from the below script.

import boto3
import botocore

BUCKET_NAME = 'my-bucket' # replace with your bucket name
KEY = 'my_image_in_s3.jpg' # replace with your object key

s3 = boto3.resource('s3')

try:
    s3.Bucket(BUCKET_NAME).download_file(KEY, 'my_local_image.jpg')
except botocore.exceptions.ClientError as e:
    if e.response['Error']['Code'] == "404":
        print("The object does not exist.")
    else:
        raise
answered Sep 14, 2020 by MD
• 95,460 points

Related Questions In Cloud Computing

0 votes
0 answers

Download from s3 into a actions workflow

Feb 18, 2022 in Cloud Computing by Rahul
• 2,120 points
409 views
+4 votes
2 answers

How come AWS S3 is erasing my extension from PDF files?

I think the problem should be with ...READ MORE

answered Mar 27, 2018 in Cloud Computing by code_ninja
• 6,300 points
4,004 views
+2 votes
6 answers

Can we download an entire S3 bucket?

Use this command with the AWS CLI: aws ...READ MORE

answered Oct 25, 2018 in Cloud Computing by tryhard
4,302 views
0 votes
1 answer

File Renaming in S3

Directly? Well , no you need to ...READ MORE

answered Apr 13, 2018 in Cloud Computing by brat_1
• 7,200 points
715 views
+1 vote
2 answers

I want to Migrate from Oracle RDBMS to AWS S3 using Kinesis

Try to understand AWS Schema Conversion Tool ...READ MORE

answered Apr 20, 2018 in Cloud Computing by hemant
• 5,790 points
2,498 views
0 votes
1 answer
0 votes
1 answer
+8 votes
3 answers

How to download folder from AWS S3?

To Download using AWS S3 CLI : aws ...READ MORE

answered Sep 7, 2018 in Cloud Computing by eatcodesleeprepeat
• 4,710 points
289,037 views
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