Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
export AWS_DEFAULT_REGION=${REGION:-eu-west-1}
aws ec2 describe-addresses \
--query 'Addresses[*][InstanceId, PublicIp]' \
--output text \
| while read ID IP
echo -en "$IP\\t"
aws ec2 describe-instances \
--instance-ids $ID \
--query "Reservations[].Instances[].Tags[?Key=='Name'].Value" \
--output text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.