Skip to content

Instantly share code, notes, and snippets.

@akkefa
Created April 15, 2017 08:49
Show Gist options
  • Save akkefa/a65a650061081a01e7d80ce6f48efecf to your computer and use it in GitHub Desktop.
Save akkefa/a65a650061081a01e7d80ce6f48efecf to your computer and use it in GitHub Desktop.
Using familiar syntax, you can view the contents of your S3 buckets in a directory-based listing.
$ aws s3 ls s3://mybucket
LastWriteTime Length Name
------------- ------ ----
PRE myfolder/
2013-09-03 10:00:00 1234 myfile.txt
...
You can perform recursive uploads and downloads of multiple files in a single folder-level command. The AWS CLI will run these transfers in parallel for increased performance.
$ aws s3 cp myfolder s3://mybucket/myfolder --recursive
upload: myfolder/file1.txt to s3://mybucket/myfolder/file1.txt
upload: myfolder/subfolder/file1.txt to s3://mybucket/myfolder/subfolder/file1.txt
...
A sync command makes it easy to synchronize the contents of a local folder with a copy in an S3 bucket.
$ aws s3 sync myfolder s3://mybucket/myfolder --exclude *.tmp
upload: myfolder/newfile.txt to s3://mybucket/myfolder/newfile.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment