Posts

How to download entire AWS "S3 bucket"

Downloading AWS s3 bucket is a three step process: 1) Install AWS CLI Follow this link to install: https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-mac.html 2) Configure AWS credentials 2.1) Click on your username [Top Right corner of AWS console] > My Security Credentials > Access keys (access key ID and secret access key) > Create New Access Key Now copy following:  1) Access Key ID 2) AWSSecretKey 2.2) Create a file [ ~/.aws/credentials ] in your local machine as follows: $ cd ~/ $ mkdir .aws $ cd .aws $ touch credentials Write following in this file: $ vi credentials [default] aws_access_key_id=[YOUR_Access Key ID] aws_secret_access_key=[YOUR_AWSSecretKey] 3) Download s3 bucket aws s3 sync s3://[bucket_name] ~/Desktop/s3/ Here [bucket_name] is the name of the bucket to download, but name only and not the entire URL, "~/Desktop/s3/" id the path on your local machine where you want to download bucket data. Thats it. Cheers :)