I need to find out the arn of a load balancer. The only information I have is the DNS name.
It seems to be easy to extract the region from the DNS name, as it is part of it:
MyElbName.us-west-2.elb.amazonaws.com
Filtering, though, does not work:
# aws elbv2 describe-load-balancers --filters "Name=DNSName,Values=MyElbName-1190680708.us-west-2.elb.amazonaws.com" usage: aws [options] [ ...] [parameters] To see help text, you can run: aws help aws help aws help Unknown options: --filters, Name=DNSName,Values=MyElbName-1190680708.us-west-2.elb.amazonaws.com --region "us-west-2" #
Is the --filters
option maybe just not available in the elbv2
namespace? I have the same issue in the elb
namespace, but in elb
, even the region is not available.
--filter
option for this command. See: describe-load-balancers — AWS CLI Command Reference – John Rotensteinelbv2
and specify my region. - Thanks for the information about the lack of availability of that parameter; I did not find the information anywhere. I might need to filter by jq or so... – hey