How to download a folder from s3

July 3, 2024

Install AWS CLI

Open AWS CLI. Download and run in your system.

Generate Access Keys

Navigate to AWS IAM and create a new AWS user. You can keep this flag "Provide user access to the AWS Management Console - optional" unchecked. Scroll down and click on Security Credentials. Create access key and download the file. Make sure you store this file in a secure place and don't share it with anyone.

Now open Command Prompt (in windows) and enter the following command:

aws configure

It will ask you to enter AWS Access Key ID, AWS Secret Access Key, Default Region name, Default output format. Copy the access ID and secret key from the downloaded file. Enter a region you want to be default and hit Enter.

Download Files

Enter the following command to download the destination folder. Replace bucket-name with your bucket name. Replace folder-name to the folder you want to download. You can replace C:\local\folder with any local folder where you want to download. You can replace the region too.

aws s3 cp s3://bucket-name/folder-name C:\local\folder --recursive --region us-west-2

Hope it helps!