DNS resolution with VPC based OpenSearch and Lambda

0

I've deployed an OpenSearch Domain and Lambda into a new VPC. The VPC has DNS hostnames and resolution enabled.

I've added a OpenSearch VPC Endpoint which is allowing me to connect to the OpenSearch UI so generally happy that the domain is up and running. However, I've put together a simple python lambda to try and post documents to the domain but when it tries to post, it fails with Name or Service not known.

I've then amended the lambda to do a DNS lookup and that is also failing - when I replace the hostname with google.com, it does the lookup fine.

Finally, I enabled the VPC DNS logging - when the lambda runs, I can see the request but the answers section is empty.

Any suggestions on how I can allow the lambda to resolve the hostname for the OpenSearch domain?

1 Antwort
0

Not sure if it's bad form to answer your own question ;) If anyone comes across something similar make sure no-one has created a hosted zone in route53 with the service domain i.e. <region>.1.es.amazonaws.com

profile picture
beantwortet vor 8 Monaten
  • The response is not super clear. Do you mean that you had hosted zone with "<region>.1.es.amazonaws.com" ? How did you resolve the issue ? By deleting the hosted zone ?

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen