Created
November 6, 2017 19:21
-
-
Save nmagee/6bc36855cfa4d0c26ba252ebb4cd8be8 to your computer and use it in GitHub Desktop.
Synchronize an S3 bucket with a local folder
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
#!/bin/bash | |
bucket='YOUR-BUCKET-NAME' | |
dir='/your/local/directory/' | |
aws s3 sync s3://$bucket/ $dir | |
# If you want the bucket to match the local directory exactly, including any files | |
# you may delete at a later point, add --delete after sync | |
# | |
# aws s3 sync --delete s3://$bucket/ $dir | |
# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment