Failed to establish a new connection: [Errno -3] Temporary failure in name resolution while calling Lambda from Local machine Python Requests Module

0

While invoking a Lambda Function URL using Python from the local machine, I am getting the Error

Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

I recently started facing this issue while calling Lambda Function from the local environment, which used to work completely fine a while back, using the Same Lambda Function, the Same Lambda Function URL, with the same permissions and all, no change. The URL has no restrictions and can be publicly accessed with CORS enabled.

When I changed my local router connection to a different one, it started working fine. Is it due to some kind of IP blockage from the AWS side? I am even able to invoke the function from a server, or postman in the browser, but local invocation does not work, for ANY Lambda function. Works for EC2 and other services, but lambda seems to be blocked.

Using Python 3.8.10 with the latest version of the requests module. No change is there from the module's point of view.

In Postman, I get

Error: getaddrinfo ENOTFOUND xxxxxxxxx.lambda-url.us-east-1.on.aws

Would appreciate some help on this. Thanks.

1 Respuesta
0

The error seems to be related to your DNS configuration. Your machine is not able to map the DNS name to an IP address. Try running nslookup to see what you get.

profile pictureAWS
EXPERTO
Uri
respondido hace 6 meses

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas