ls-ec2

Usage

$ ls-ec2

with peco and ssh:

connect_to_ec2() { ssh $(ls-ec2 | peco | awk '{print "username@"$3}') }
alias s="connect_to_ec2"
$ s

Install

$ brew tap yuichiro-h/ls-ec2
$ brew install ls-ec2

You need to set aws credentials environmental variable:

$ export AWS_ACCESS_KEY_ID="0123456789ABCDEFGHIJ"
$ export AWS_SECRET_ACCESS_KEY="0123456789ABCDEFGHIJ0123456789ABCDEFGHIJ"

Update

$ brew update
$ brew upgrade ls-ec2