Search code examples
amazon-web-servicesdockeramazon-elastic-beanstalkamazon-ecs

AWS EC2 Container Service / Elastic Beanstalk Docker Container Port udp binding


According to the documentation of ECS task definitions, this is how we define port mappings.

"portMappings": [
    {
        "containerPort": integer,
        "hostPort": integer
    }
    ...
]

By default this is binding port over tcp. How to achieve udp port bindings to docker containers running in AWS Elastic Beanstalk (Multi-container) or with AWS ECS ?


Solution

  • UDP support has been missing still from the GA release of the Amazon EC2 Container Service, see Ports are assumed to be TCP (issue #2) of the Amazon ECS Container Agent. Luckily this surprising gap has already been addressed and the new ECS agent version is pending release - I would expect this release to happen anytime soon and the AWS Elastic Beanstalk team is usually quick to update their official images in due course (keep an eye on the Elastic Beanstalk forum for resp. announcements).