Created
October 3, 2017 21:21
-
-
Save alertedsnake/4bb4e421ab60aaac5de5006d6123d9f7 to your computer and use it in GitHub Desktop.
Useful EC2 shell functions
This file contains 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
ec2ip() { | |
aws ec2 describe-instances --instance-ids $* | jq '.Reservations[0].Instances[0].PrivateIpAddress' | sed 's/"//g' | |
} | |
ec2ssh() { | |
ssh $(ec2ip $1) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment