79240275

Date: 2024-11-30 18:41:29
Score: 1.5
Natty:
Report link

AWS ECS, by default, uses the default bridge network when selecting "bridge" for the network settings on an ECS Task Definition. Per Docker Docs, "User-defined bridges provide automatic DNS resolution between containers. Containers on the default bridge network can only access each other by IP addresses, unless you use the --link option, which is considered legacy. On a user-defined bridge network, containers can resolve each other by name or alias."

When defining a network in a dockercompose.yml, specifying "bridge" specifies a user-defined bridge network, which is why DNS Resolution resolved between my local containers.

Unfortunately and from the information I was able to gather, AWS does not currently support for the user-defined bridge networking option. Switching to awsvpc is likely to best move at the moment.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: thecodeiackiller