- Newest
- Most votes
- Most comments
Hello.
For communication using bridge mode, you should be able to communicate using the container name by setting "links" in the task definition.
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html
The link parameter allows containers to communicate with each other without the need for port mappings. This parameter is only supported if the network mode of a task definition is set to bridge. The name:internalName construct is analogous to name:alias in Docker links. Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed. For more information about linking Docker containers, see https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/. This parameter maps to Links in the Create a container section of the Docker Remote API and the --link option to docker run.
Relevant content
- asked 10 months ago
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
but my task definitions are separated
In that case, I think you can use Service Discovery. By setting up Service Discovery, it is possible to communicate using the DNS name that each task has. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html