Skip to content

Instantly share code, notes, and snippets.

@alertedsnake
Created October 3, 2017 21:21
Show Gist options
  • Save alertedsnake/4bb4e421ab60aaac5de5006d6123d9f7 to your computer and use it in GitHub Desktop.
Save alertedsnake/4bb4e421ab60aaac5de5006d6123d9f7 to your computer and use it in GitHub Desktop.
Useful EC2 shell functions
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