Posted On: Dec 16, 2022

Amazon Elastic Container Service (Amazon ECS) now enables you to configure port ranges for your container as part of the port mapping. Port mappings (specified in the container definition) allow containers to access ports on the host container instance to send or receive traffic. In addition to individual ports, Amazon ECS now allows your application to access an entire range of ports that you select by opening these ports on the container for you, and binding them to ports on the host. This makes it easier for you to run applications such as game servers and real-time streaming which typically require multiple ports to be opened simultaneously on the container.

You can use container port ranges for Amazon ECS port mappings with the ‘awsvpc’ network mode for your Amazon ECS tasks running on Amazon Elastic Compute Cloud (Amazon EC2) and AWS Fargate. You can also use container port ranges with ‘bridge’ network mode on Amazon EC2 when you use dynamic port mapping.

Amazon ECS support for container port ranges in port mappings is now available in all AWS regions including AWS GovCloud (US) Regions. To learn more, please refer to our documentation.