serverless-localstack icon indicating copy to clipboard operation
serverless-localstack copied to clipboard

Connection refused trying to access to an external container

Open Warkanlock opened this issue 3 years ago • 0 comments
trafficstars

Hi! I'm trying to connect in between two containers (one database on a network called development) and the other using serverless-localstack with the following configuration:

  localstack:
    debug: true
    host: "http://  localhost"
    autostart: true
    stages:
      - local
    networks:
      - development

Everything looks OK until I want to access to the database using a HTTP connector inside the Lambda: I receive a Connection refused for 127.0.0.1:5732 which makes sense, since I'm trying to access to a different container, but I'm configuring the development network and happens.

Does anyone knows how to connect a local lambda to a database running in other container? This issue is driving me crazy

Warkanlock avatar Jun 30 '22 11:06 Warkanlock