Using AWS CLI
Install AWS CLI: Installing AWS CLI documentation
After installation, run this:
Command:
aws s3 sync s3://your_bucket_name .
Output:
download: s3://your_bucket_name/test.txt to test.txt
download: s3://your_bucket_name/test2.txt to test2.txt
One-way sync - This can be used to download all of your files. No existing files will be deleted in your current directory. Unless you specify the --delete tag, there won’t be any change in your S3 bucket.
You can also do S3 bucket to S3 bucket, or local to S3 bucket sync.
Check out this documentation for more insights:
http://docs.aws.amazon.com/cli/latest/reference/s3/sync.html
How to download a folder from a bucket:
The above example downloads a complete bucket, but if you only want a particular folder use this:
aws s3 cp s3://your_bucket_name/PATH/TO/FOLDER local_folder_name --recursive
All files and folder keys in that /PATH/TO/FOLDER directory inside the Bucket will be downloaded recursively until everything is download.