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

Axxy picture Axxy · Aug 16, 2017 · Viewed 33.7k times · Source

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

Answer

Frederic Henri picture Frederic Henri · Aug 16, 2017

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"