I noticed that there doesn't seem to be an option to download an entire S3 bucket from the AWS Management Console.
Is there an easy way to grab everything in one of my buckets? I was thinking about making the root folder public, using wget
to grab it all, and then making it private again but I don't know if there's an easier way.
Best Answer
AWS CLI
See the "AWS CLI Command Reference" for more information.
AWS recently released their Command Line Tools, which work much like boto and can be installed using
or
Once installed, you can then simply run:
For example:
will download all the objects in
mybucket
to the current directory.And will output:
This will download all of your files using a one-way sync. It will not delete any existing files in your current directory unless you specify
--delete
, and it won't change or delete any files on S3.You can also do S3 bucket to S3 bucket, or local to S3 bucket sync.
Check out the documentation and other examples.
Whereas the above example is how to download a full bucket, you can also download a folder recursively by performing
This will instruct the CLI to download all files and folder keys recursively within the
PATH/TO/FOLDER
directory within theBUCKETNAME
bucket.