Created
March 28, 2016 14:59
-
-
Save tjpatter/9e3ffd602e0c4f80bacd to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
ip=$1 | |
aws ec2 describe-instances --filter "Name=private-ip-address, Values=${ip}" --query 'Reservations[*].Instances[*].{InstanceId:InstanceId,PrivateIpAddress:PrivateIpAddress,Name:Tags[?Key==`Name`] | [0].Value}' --output text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment