Connection services in different containers in the same ec2 instance

21 views Asked by At

I am currently running two services in two separate containers in a single ec2 instance: a web application and an api respectively. what do i use to connect the web application to the api in the same ec2 instance? I have used the private IP and private dns in the web config to point to the api but i am still getting timeout error.

1

There are 1 answers

6
deep bajaj On

You may use docker-compose by default the containers will be in same network and they will be able to communicate with each other.