Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Refer to another service/task running in same ECS cluster

I know how to refer to "services" from within the same task. But how can I refer to an essential task from within another task definition? For example:

  • Service "mesage-broker" is running task rabbitmq.
    • Service "user-api" is running task user-api and needs to be configured to be able to connect to rabbitmq.
    • Service "order-api" is running task order-api and needs to be configured to be able to connect to rabbitmq.
like image 337
Pepster Avatar asked Jun 24 '16 22:06

Pepster


People also ask

Can an ECS service have multiple tasks?

After you create a task definition for your application within Amazon ECS, you can specify the number of tasks to run on your cluster. An Amazon ECS service runs and maintains your desired number of tasks simultaneously in an Amazon ECS cluster.

Can ECS tasks talk to each other?

AWS ECS also comes with Service Discovery, which lets tasks communicate with each other using simple service names, irrespective of where they are running and how many of them are running. This is essential for Microservices architecture where Microservices have to talk to each other.

How many ECS tasks can run in parallel?

Services configured to use Amazon ECS service discovery have a limit of 1,000 tasks per service.

How do I connect to ECS tasks?

To connect to your container instanceOpen the Amazon ECS console at https://console.aws.amazon.com/ecs/ . Select the cluster that hosts your container instance. On the Cluster page, choose ECS Instances. On the Container Instance column, select the container instance to connect to.


1 Answers

ECS has service discovery built in This makes it possible for an ECS service to automatically register itself with a predictable and friendly DNS name in Amazon Route 53.

like image 138
Fedor Avatar answered Sep 23 '22 04:09

Fedor