Amazon EC2 Container Service TaskDefinition ContainerDefinitions PortMappings
PortMappings is a property of the Amazon EC2 Container Service TaskDefinition
ContainerDefinitions property that maps
a container port to a host port.
For more information about each property, see Task Definition Parameters in the Amazon EC2 Container Service Developer Guide.
The port number on the container bound to the host port.
The host port number on the container instance that you want to reserve for your container. You can specify a non-reserved host port for your container port mapping, omit the host port, or set the host port to
0. If you specify a container port but no host port, your container host port is assigned automatically .
Don't specify a host port in the
65535port range; these ports are reserved for automatic assignment. Other reserved ports include
2376for Docker, and
51678for the Amazon EC2 Container Service container agent. Don't specify a host port that is being used for a task—that port is reserved while the task is running.
The protocol used for the port mapping. For valid values, see the
protocolparameter in the Amazon EC2 Container Service Developer Guide. By default, AWS CloudFormation specifies