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 12, 2020 in Cloud Computing by Raj
• 120 points
539 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,220 points

Related Questions In Cloud Computing

+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,280 points
1,873 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
2,092 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,180 points
106 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,810 points
1,162 views
0 votes
1 answer

Can you filter through the created tags by using S3 file tagging?

You cannot filter with S3 file tagging ...READ MORE

answered May 8, 2018 in Cloud Computing by Meci Matt
• 9,460 points
117 views
0 votes
1 answer
0 votes
1 answer
+6 votes
3 answers

How to download folder from AWS S3?

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

answered Sep 6, 2018 in Cloud Computing by eatcodesleeprepeat
• 4,790 points
84,987 views