Amazon ECS supports Docker networking and integrates with Amazon VPC to provide isolation for containers. This gives you control over how containers connect with other services and external traffic. With Amazon ECS, you can choose between four networking modes for your containers that cater towards different use cases:
Task Networking/awsvpc
This mode assigns each running ECS task a dedicated elastic networking interface, allowing containers full networking features in a VPC, just like EC2 instances.
Bridge
This mode creates a Linux bridge that connects all containers running on the host in a local virtual network, which can be accessed through the host's default network connection.
Host
This mode adds containers directly to the host’s network stack, exposing containers on the host's network with no isolation.
None
This mode disables external networking for containers.