Last active
October 17, 2017 07:12
-
-
Save wmakeev/3d9af17dd476a5bdda11 to your computer and use it in GitHub Desktop.
S3 sync #s3 #cli #sync
This file contains hidden or 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
#!/usr/bin/env bash | |
# http://docs.aws.amazon.com/cli/latest/reference/s3/cp.html | |
aws s3 cp /tmp/foo/ s3://bucket/ --recursive --exclude "*" --include "*.jpg" |
This file contains hidden or 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
#!/usr/bin/env bash | |
# Sync local folder to S3 bucket | |
# Script run | |
# Add script permission to run | |
# chmod +x ./sync.sh | |
# http://docs.aws.amazon.com/cli/latest/reference/s3/sync.html | |
aws s3 sync . s3://bucket-name/path/to/folder \ | |
--acl public-read \ | |
--exclude '.DS_Store' \ | |
--storage-class REDUCED_REDUNDANCY \ | |
--delete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment