Skip to content

Instantly share code, notes, and snippets.

@nmagee
Created November 6, 2017 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nmagee/0eab9793b1efd7728968924c2ddd61f2 to your computer and use it in GitHub Desktop.
Save nmagee/0eab9793b1efd7728968924c2ddd61f2 to your computer and use it in GitHub Desktop.
Synchronize a local folder up to an S3 bucket
#!/bin/bash
bucket='YOUR-BUCKET-NAME'
dir='/your/local/directory/'
aws s3 sync $dir s3://$bucket
# 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 $dir s3://$bucket
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment