Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fargate with Docker compose Links

We have an application that uses docker compose that contains links.

I'm trying to deploy this using aws-cli on Amazon Fargate using this command:

ecs-cli compose --project-name myApp --file docker-compose-aws.yml --ecs-params fargate-ecs-params.yml --cluster myCluster --region us-east-1 up --launch-type FARGATE

When my fargate-ecs-params.yml has ecs_network_mode: awsvpc I get the error: Links are not supported when networkMode=awsvpc

So I've tried changing to ecs_network_mode: awsvpc, however I then get the error: Fargate only supports network mode ‘awsvpc’

My question is how do I create a task definition for Fargate with a compose file that contains links? Or is this not possible (and in that case then what are my alternatives?)

like image 915
tomwilding Avatar asked Feb 15 '26 11:02

tomwilding


1 Answers

You can place both container in same task definitons they will automatically linked with each other.

like image 181
Saurav Khandelwal Avatar answered Feb 17 '26 02:02

Saurav Khandelwal