Developer Notes

Download files or directory from AWS S3 bucket using aws-cli in Linux

You can easily download files from your S3 bucket to your local filesystem using Amazon’s aws-cli (AWS Command Line Interface).

Install aws-cli

To install aws-cli:

Download the aws-cli directory:

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscli.zip"

Extract the installer:

unzip awscli.zip

Install aws-cli as root:

sudo aws/install

Download files from the Amazon S3 bucket

Configure the AWS access key ID and secret access key for aws-cli:

aws configure

Download the files:

To download a single file:

aws s3 cp s3://BUCKET_NAME/BUCKET_PATH LOCAL_DIRECTORY

To download a directory:

aws s3 cp s3://BUCKET_NAME/BUCKET_PATH LOCAL_DIRECTORY --recursive

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Articles

Want your website to turn up in Google Search results? You can submit your website for indexing in Google Search
Occasionally, we need to bring our website visitors to a maintenance page. Don't worry, you can spin up a Maintenance
When you are deploying changes to a WordPress website, you might encounter an error about PHP's upload_max_filesize. Here is one
After installing Android Studio in Ubuntu, you might experience getting a blank screen instead of the Android Studio Setup Wizard.
It might surprise you how much storage space Snap packages use. You will most likely find that your Snap packages
The Loop Grid widget allows you to set the total number of items to load and display in the Loop

Recent Articles

Topics

Related Topics