Last active
August 29, 2015 14:05
-
-
Save hrkd/61444ced779298236f2e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#ELBにぶら下がるエンドポイントのIPを取得する | |
VAR=`aws elb describe-instance-health --load-balancer-name your-elb-name --region your-region | jq -r .InstanceStates[].InstanceId` | |
echo "${VAR}" | while read line | |
do | |
VAR2=`aws ec2 describe-instances --region your-region --instance-ids ${line} | jq -r ".Reservations[].Instances[].PrivateIpAddress"` | |
#this is IP | |
echo "${VAR2}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment