We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1dba4f3 commit f35b5a4Copy full SHA for f35b5a4
localstack-core/localstack/aws/connect.py
@@ -660,7 +660,11 @@ def resolve_dns_from_upstream(hostname: str) -> str:
660
if len(response.answer) == 0:
661
raise ValueError(f"No DNS response found for hostname '{hostname}'")
662
663
- ip_addresses = list(response.answer[0].items.keys())
+ ip_addresses = []
664
+ for answer in response.answer:
665
+ if answer.match(dns.rdataclass.IN, dns.rdatatype.A, dns.rdatatype.TYPE0):
666
+ ip_addresses.extend(answer.items.keys())
667
+
668
return choice(ip_addresses).address
669
670
0 commit comments