我在具有4个节点上的公共ELB的VPN中运行我的应用程序,我想知道该ELB后面所有节点的ipAddress。
You Can Create a CLI Script .
Using the AWS CLI -
Pass the ELB name to describe the LoadBalancer.
aws elb describe-load-balancers --load-balancer-name sarat-load-balancer
It returns a set of instance id running behind the load balancer in Json Format. Extract the Instance ids and Put them in a Loop .
Pass the Instance ids to describe the Instance.
aws ec2 describe-instances --instance-ids i-xxxxxxxxxx
It returns a set of data with public ips of the instances in Json Format.
You can do the same with SDK .
Hope It Helps.. :)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.