Instagram/ec2-ssh — pull request #5 by croach (2011-10-25 10:42:52+00:00)
Title: Added support for specifying the tag to search on

In this pull request (in addition to the four commits from #4) I've added support for specifying the tag that you wish to use to select the EC2 instance.

The way this works is as follows:

1) Running "ec2-host -t tag-name" will list all of the instances with value for the given tag
2) Running "ec2-host -t tag-name value" will list the instance that matches the tag=value criteria
3) Running "ec2-ssh -t tag-name value" will ssh into the instance matching the tag=value criteria
4) Running "ec2-ssh tag-name:value" is shorthand for (3)

The default if the tag option is left off is 'Name' and so, without this option, both scripts will continue to behave as they do now.