Debug connection to another domain from aws lambda


Hi! I have a problem connecting to a droplet on digitalocean from lambda. The problem is that this lambda connects to the internet without any problem. I can connect to any other domain, just not digitalocean. How can I debug this connection? Is there any way to run MTR or traceroute from lambda? My setup: AWS lambda in a private network, connects to the Internet via NAT gateway. On lambda I have code in nest.js

asked 20 days ago59 views
2 Answers


How about starting EC2 in the subnet associated with Lambda and checking if it can be accessed from EC2?
If you cannot access from EC2, it is possible that the IP address used by NAT Gateway is blocked at the connection destination.

It seems possible to implement traceroute in Node.js as well.

profile picture
answered 20 days ago

Yes, I tried to do that, but from ec2 I was able to connect. I did one more test. I deployed in a different environment. I use a different NAT gateway there. And the result is the same - timeout

answered 20 days ago

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