amazon-ecsaws-service-connect

ECS Service Connect container links conflict


I have the following problem:

Trying to deploy an application on ECS. It comprises of multiple ECS services that use Service Connect to talk to each other.

The "AppService" is composed of 2 containers (nginx + php), I normally make this work by adding an app link to nginx the problem is that because of ServiceConnect the nginx container fails to start with error message:

CannotCreateContainerError: Error response from daemon: conflicting options: container type network can't be used with links. This would result in undefined behavior

The ECS services are running on an EC2 cluster, so as far as I understand awsvpc network mode is not a solution, so I think I'm stuck with bridge mode.

I'm looking for a way to keep using Service Connect and be able to make the nginx talk to app at the same time.

Thank you.


Solution

  • After further documentation, what I was trying to achieve is not possible and I had to switch to NetworkMode: awsvpc and have the containers talk to each other through localhost.