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개 답변
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
전문가
Uri
답변함 6달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠