Last active
October 22, 2017 11:24
-
-
Save Mukei/ca2579a2e4079c50b11842508fd37aad to your computer and use it in GitHub Desktop.
[S3 copy snippets] #AWS #S3 #snippets #cookbook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! | |
# Using aws s3 cp will require the --recursive parameter to copy multiple files. | |
aws s3 cp s3://myBucket/dir localdir --recursive | |
#The aws s3 sync command will, by default, copy a whole directory. It will only copy new/modified files. | |
aws s3 sync s3://mybucket/dir localdir | |
#Just experiment to get the result you want. | |
#You can combine --exclude and --include options to copy only objects that match a pattern, excluding all others. | |
aws s3 cp s3://mybucket/logs/ s3://mybucket2/logs/ --recursive --exclude "*" --include "*.log" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment