NetworkMode

class aws_cdk.aws_ecs.NetworkMode

Bases: enum.Enum

The networking mode to use for the containers in the task.

Attributes

AWS_VPC

The task is allocated an elastic network interface.

BRIDGE

The task utilizes Docker’s built-in virtual network which runs inside each container instance.

HOST

The task bypasses Docker’s built-in virtual network and maps container ports directly to the EC2 instance’s network interface directly.

In this mode, you can’t run multiple instantiations of the same task on a single container instance when port mappings are used.

NAT

The task utilizes NAT network mode required by Windows containers.

This is the only supported network mode for Windows containers. For more information, see Task Definition Parameters.

NONE

The task’s containers do not have external connectivity and port mappings can’t be specified in the container definition.

Attributes

AWS_VPC = 'AWS_VPC'

The task is allocated an elastic network interface.

BRIDGE = 'BRIDGE'

The task utilizes Docker’s built-in virtual network which runs inside each container instance.

HOST = 'HOST'

The task bypasses Docker’s built-in virtual network and maps container ports directly to the EC2 instance’s network interface directly.

In this mode, you can’t run multiple instantiations of the same task on a single container instance when port mappings are used.

NAT = 'NAT'

The task utilizes NAT network mode required by Windows containers.

This is the only supported network mode for Windows containers. For more information, see Task Definition Parameters.

NONE = 'NONE'

The task’s containers do not have external connectivity and port mappings can’t be specified in the container definition.