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 Answer
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
answered 8 months ago
  • 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 ?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions