title: Linking containers between task definitions in AWS ECS?
body: <p>I'm trying to setup a basic web application, which has an associated database, in AWS ECS. Locally I have these setup in different containers, and on ECS, I'd like to have separate task definitions so that I may scale the two separately.</p>
  
  <ol>
  <li>I registered my first task definition as <code>david_mongodb</code> successfully in ECS. It has a container named <code>david_mongodb</code> in it.</li>
  <li>Then I attempted to register my second task definition as <code>david_web</code>, which has a container named <code>david_web</code> that links the database via <code>david_mongodb:db</code>.</li>
  <li><p>When I click 'Create', it returns an error:</p>
  
  <pre><code>Unable to create Task Definition
  Linked container 'david_mongodb:db' doesn't exist.
  </code></pre></li>
  </ol>
  
  <p>It seems like task definitions can't see container names in other task definitions? I'm thinking putting both <code>david_web</code> and <code>david_mongodb</code> containers in the same task definition would work, but I don't want to do that: it would prevent me from scaling either web app or database separately. <a href="http://docs.aws.amazon.com/AmazonECS/latest/developerguide/application_architecture.html">This overview</a> seems to confirm that my architecture is recommended...</p>
  
  <p>So how do I link containers that live in different task definitions? Or is there another clever way of handling this?</p>