Understanding the Community Modes in AWS ECS

If utilizing the EC2 launch kind, the allowable community mode depends upon 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 kind, the ‘awsvpc’ is the one community mode supported.

Amazon ECS process networking

The networking habits of Amazon ECS duties hosted on Amazon EC2 situations relies on the community mode outlined within the process definition. The next are the out there community modes. Amazon ECS recommends utilizing the awsvpc community mode until you’ve a selected want to make use of a unique community mode.

  • awsvpc — The duty is allotted its personal elastic community interface (ENI) and a major personal IPv4 deal with. This provides the duty the identical networking properties as Amazon EC2 situations.
  • 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. Consequently, you’ll be able to’t run a number of instantiations of the identical process 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 unique community mode (often known as NAT) than Docker for Linux.

Be aware: In case you create an ECS process defintion within the AWS console and select EC2 launch kind there’s a “Community Mode: choice. ECS will begin your container utilizing Docker’s default networking mode, which is Bridge on Linux and NAT on Home windows. (NAT) is the one supported mode on Home windows.

Fargate process networking

By default, each Amazon ECS process on Fargate is supplied an elastic community interface (ENI) with a major personal IP deal with.

Leave a Reply