I am running an AWS Lambda locally via AWS Toolkit. The function, through a long dependency chain, calls an internal service endpoint that throws a ConnectionTimeoutException
. That endpoint works when called locally.
Toolkit spins up a container to run the lambda in using the bridge
docker network running on my local machine. My local machine is also running a proxy
client in another container, and using docker network inspect bridge
from my local terminal, I can see both the proxy
and Toolkit containers are registered on the bridge network. When I shell into the running lambda container, my cUrl
command to the internal service times out. That same command on my local machine succeeds.
Shouldn't the cUrl
command work from within the lambda container?
local machine bridge network
connection time out exception
failed: connect timed out; nested exception is org.apache.http.conn.ConnectTimeoutException: Connect to internal.service.uri:80