title: How can I create a DependsOn relation between EC2 and RDS using aws-cdk
body: <p>I am currently using the <em>aws-cdk</em> (TypeScript) to create a stack that consists of an <em>EC2</em> instance and a <em>RDS</em> databaseInstance.</p>
  <p>The <em>RDS</em> instance needs to be setup before the <em>EC2</em> instance can be started and userdata will be executed.</p>
  <p>The problem I have is, that I could not find a way to define the <code>DepensOn</code> (Cloudformation) attribute between the two resources.</p>
  <p>The workaround is, that I am using netsted stacks.</p>
  <p>The code looks something like this:</p>
  <pre><code>const instance = new ec2.Instance(this, 'Instance', {...})
  const rdsInstance = new rds.DatabaseInstance(this, 'DbInstance', {...})
  </code></pre>
  <p>Now I would like to define something like <strong><code>instance.dependsOn(rdsInstance)</code></strong>.</p>
  <p>Did anybody run into the same issue?</p>