This commit is contained in:
Hossein Shafagh 2019-09-23 12:52:17 -07:00
parent 86f661a8af
commit 477db836f4
1 changed files with 3 additions and 2 deletions

View File

@ -43,7 +43,8 @@ def get_region_from_dns(dns):
# XXX.REGION.elb.amazonaws.com
if dns.endswith(".elb.amazonaws.com"):
return dns.split(".")[-4]
else: # NLBs have a different pattern on the dns XXXX.elb.REGION.amazonaws.com
else:
# NLBs have a different pattern on the dns XXXX.elb.REGION.amazonaws.com
return dns.split(".")[-3]