Download All Files From S3 bucket

Download All Files From S3 bucket to Local System

Here in this post, we will discuss how to download any folder or any specific file from the Amazon S3 bucket to the local machine. Read the full article and follow step by step.

Steps to Download All Files From S3 bucket to Local System

1. Install AWS CLI

  • In browser search AWS CLI download and from the first link download the software in your machine.
  • Or you can get the link here.
  • Install it in your machine.

2. Cinfigure AWS CLI

  • Open cmd as admin.
  • Type command aws configure and hit enter.
  • After that you will see like this
  • AWS Access Key ID [None]:  —-Enter your Access Key
  • AWS Secret Access Key [None]:   —Enter your Secret Access Key
  • Default region name [None]:   —– Enter your region  
  • Default output format [None]:  —–Press enter for the default value or its JSON
  • After entering these details you are connected to the AWS server.

3. Download the files

  • The cmd to download the file is “aws s3 sync s3://your_bucket name . “
  •  The above command will download all files from your s3 bucket.
  • If you want to exclude any file format than use the below command
  • “aws s3 sync s3://your_bucket name . –exclude *.txt  “. This command will exclude all the txt files.
  • If you want to download any specific file then the command will be . 
  • “aws s3 sync s3://your_bucket name/file_name  “.

Leave A Comment

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