If utilizing the EC2 launch sort, the allowable community mode is determined by the underlying EC2 occasion’s working system. If Linux, awsvpc, bridge, host and none mode can be utilized. If Home windows, solely the NAT mode is allowed.
If utilizing the Fargate launch sort, the ‘awsvpc’ is the one community mode supported.
The networking habits of Amazon ECS duties hosted on Amazon EC2 cases depends on the community mode outlined within the job definition. The next are the accessible community modes. Amazon ECS recommends utilizing the awsvpc community mode until you’ve gotten a selected want to make use of a special community mode.
- awsvpc — The duty is allotted its personal elastic community interface (ENI) and a major non-public IPv4 handle. This offers the duty the identical networking properties as Amazon EC2 cases.
- bridge — The duty makes use of Docker’s built-in digital community which runs inside every Amazon EC2 occasion internet hosting the duty.
- host — The duty bypasses Docker’s built-in digital community and maps container ports on to the ENI of the Amazon EC2 occasion internet hosting the duty. Because of this, you possibly can’t run a number of instantiations of the identical job on a single Amazon EC2 occasion when port mappings are used.
- none — The duty has no exterior community connectivity.
For extra details about Docker networking, see Networking overview
- NAT – Docker for Home windows makes use of a special community mode (often known as NAT) than Docker for Linux.
Word: If you happen to create an ECS job defintion within the AWS console and select EC2 launch sort there’s a “Community Mode:
By default, each Amazon ECS job on Fargate is offered an elastic community interface (ENI) with a major non-public IP handle.