title: How to make two containers connectable in AWS ECS Fargate?
body: <p>I have two containers added to a task definition </p>
  
  <ol>
  <li><p>Node Container:</p>
  
  <pre><code>name :nodeAPI
  port :exposed 5001
  mongoconnection string in the env variable : mongodb://mongo  [name of mongo container]
  </code></pre></li>
  <li><p>Mongo container:</p>
  
  <pre><code>name :mongo
  port :exposed 27017
  </code></pre></li>
  </ol>
  
  <p>The node container is not able to connect to Mongo when I run this task. I am using Fargate and network as awsvpc.</p>
  
  <ol>
  <li>How do I fix this?</li>
  <li>How do I make it work running them from separate task definitions?</li>
  </ol>