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 ?

  • User-data script not executed when starting EC2 instance from AWS CLI
  • Terraform unable to get docker to join swarm
  • How do I get AWS credentials in the AWS ECS docker container?
  • Build a Docker image on top of CodeBuild Docker Image
  • Connection refused with kubectl on EC2 ubuntu instance?
  • executable file not found in $PATH when trying to connect to a container in an AWS ECS EC2 instance
  • How to get local docker daemon info
  • docker double service names
  • Docker Consul Multiple Containers in single VM setup
  • Docker instance port Management
  • Pull docker image behind a corporate firewall throws “Server error: Status 0 while fetching image layer”
  • Permission denied error when using docker import
  • 2 Solutions collect form web for “AWS EC2 Container Service / Elastic Beanstalk Docker Container Port udp binding”

    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).

    According to https://github.com/aws/amazon-ecs-agent/issues/2, this should be now supported:

    "portMappings": [
        {
            "containerPort": integer,
            "hostPort": integer,
            "protocol": "udp",
        }
        ...
    ]
    
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.