Choosing a network mode - Amazon Elastic Container Service

Choosing a network mode

The approaches previously mentioned for architecting inbound and outbound network connections can apply to any of your workloads on AWS, even if they aren’t inside a container. When running containers on AWS, you need to consider another level of networking. One of the main advantages of using containers is that you can pack multiple containers onto a single host. When doing this, you need to choose how you want to network the containers that are running on the same host. The following are the options to choose from.

  • Host mode - The host network mode is the most basic network mode that's supported in Amazon ECS.

  • Bridge mode - The bridge network mode allows you to use a virtual network bridge to create a layer between the host and the networking of the container.

  • AWSVPC mode - With the awsvpc network mode, Amazon ECS creates and manages an Elastic Network Interface (ENI) for each task and each task receives its own private IP address within the VPC.