Skip to content

Instantly share code, notes, and snippets.

@elgreg
Created September 4, 2015 20:20
Show Gist options
  • Save elgreg/dd4e0685ee84f1467d86 to your computer and use it in GitHub Desktop.
Save elgreg/dd4e0685ee84f1467d86 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Usage - elb_private_ips [name-of-elb]
aws elb describe-instance-health --load-balancer-name $1 | jq '.InstanceStates' | jq '.[] | .InstanceId' | xargs aws ec2 describe-instances --instance-ids | jq .Reservations | jq '.[] | .Instances[0].PrivateDnsName'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment