title: How can I expose docker containers internally to each other with AWS CloudFormation?
body: <p>I am an AWS noob. I have a web server container and a selenium hub container. My web server needs to access the other container; I can do this on development environment using docker-compose (by default containers are exposed to each other by name).
  I am confused about how to do this by using AWS CloudFormation.
  There is <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-containerdefinitions.html#cfn-ecs-taskdefinition-containerdefinition-links" rel="nofollow noreferrer">&quot;links&quot; parameter in the ContainerDefinition</a> but I think this uses the legacy docker link parameter. So I am reluctant to use it.</p>
  <p>Any recommendation?</p>
  <p>P.S: I don't want to open the selenium instance to public so using public hostnames/IPs is not an option.</p>