AwsRsync
Rsync local files to an AWS EC2 instance for a faster development flow.
This tool is useful for working with single EC2 instances. It takes the instance's id as the main argument and uses it to look up the instance's IP address. It then rsyncs your local project folder to a folder on the specified EC2 instance.
Some convenient things the tool does:.
- rsync default options are provided.
- The rsync exclude option is derived from the
.gitignore
and.dockerignore
files in the local folding being sync.
Usage
aws-rsync sync INSTANCE_ID
Examples:
aws-rsync sync i-123456789
aws-rsync sync i-123456789 --watch
aws-rsync sync i-123456789 --private-ip
aws-rsync sync i-123456789 --private-ip --watch
aws-rsync sync i-123456789 --noop
Overriding the rsync command
You can override the rsync command that gets used with 2 environment variables:
- AWS_RSYNC_OPTIONS: Override the rsync main options used.
- AWS_RSYNC_EXCLUDE: Override the rsync exclude options used.
Installation
$ gem install aws-rsync
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am "Add some feature"
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request