Last active
February 14, 2019 20:44
-
-
Save eon01/e62c1ccdfbc144f8d1df004180aabb77 to your computer and use it in GitHub Desktop.
This gist helps you to auto synchronize a local folder with an S3 bucket as soon as 1 or more files in the folder change. Helpful for live debugging when developping.
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
| 1) Install inotifywait | |
| sudo apt install inotifywait | |
| 2) Use inotifywait to sync your folders to S3 | |
| s3folder = "<your_s3_fodler_path>" | |
| s3bucket = "s3://<your_s3_bucket_name>" | |
| while inotifywait $s3folder; do aws s3 sync $s3folder $s3bucket --delete; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment