Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Download s3 bucket files on user's local using aws cli

Tags:

How to download simple storage service(s3) bucket files directly on user's local machine?

like image 915
Axxy Avatar asked Aug 16 '17 10:08

Axxy


People also ask

How do I download from S3 bucket to local using AWS CLI?

Your answer You can use cp to copy the files from an s3 bucket to your local system. Use the following command: $ aws s3 cp s3://bucket/folder/file.txt . To know more about AWS S3 and its features in detail check this out!

How do I download multiple files from S3 bucket to local?

If you have Visual Studio with the AWS Explorer extension installed, you can also browse to Amazon S3 (step 1), select your bucket (step 2), select al the files you want to download (step 3) and right click to download them all (step 4).

How do I download to aws S3 bucket?

You can also download the object to your local computer. In the Amazon S3 console, choose your S3 bucket, choose the file that you want to open or download, choose Actions, and then choose Open or Download. If you are downloading an object, specify where you want to save it.


1 Answers

you can check the aws s3 cli so to copy a file from s3.

The following cp command copies a single object to a specified file locally:

aws s3 cp s3://mybucket/test.txt test2.txt 

Make sure to use quotes " in case you have spaces in your key

aws s3 cp "s3://mybucket/test with space.txt" "./test with space.txt" 
like image 135
Frederic Henri Avatar answered Sep 18 '22 13:09

Frederic Henri