title: Do ec2 instances automatically connect to RDS databases using a private ip when they are in the same vpc?
body: <p>I have an rds database that I am connecting to from an ec2 instance in the same VPC. Someone told me that when ec2 instances connect to an rds instance in the same vpc, that it is over the private subnet. </p>
  
  <ol>
  <li>Is this true?</li>
  <li>Is this documented somewhere in amazon's docs? If so where? </li>
  </ol>
  
  <p>The reason I am unsure, is that I have an RDS instance that is available on the public internet and also, presumably, on my private network. When I ping the endpoint while ssh'ed into my ec2 instance on the private network it resolves to the same ip address as when I ping it from my laptop. If it is connecting over private ip, why does it say they have the same ip address? </p>