I'm using the AWS CLI to retrieve the load balancer IP to another EC where runs a service that needs the IP and Port(TCP) in a configuration file.
Recently we migrated from classic load balancer to network load balancer.
Using classic load balancer the name was possible to retrieve it using the following command:
aws elb describe-load-balancers \
--load-balancer-name my-load-balancer \
--query LoadBalancerDescriptions[].DNSName \
--output text
But I didn't find any way to do the same using the elbv2. How can I get the DNSName from it based on load balancer Name?
aws elbv2 --names my-load-balancer
and queried forLoadBalancers[].DNSName
and it didn't work? – jarmod