title: How to get an RDS endpoint for a specific VPC using AWS CLI
body: <p>I have the command to list all the RDS endpoints I have running in my aws account but I want to find RDS endpoint for RDS running in the same VPC as the ec2 instance I want to use it from.</p>
  
  <p>I have multiple VPC's up with multiple RDS's so when I issue the command it gives me all the running RDS's. How can i filter this to just show me the one in the same VPC?</p>
  
  <p>I run the command - </p>
  
  <p><code>aws rds --region us-east-2 describe-db-instances --query "DBInstances[*].Endpoint.Address"</code></p>
  
  <p>And I get - </p>
  
  <p><code>"acme-networkstack.vbjrxfom0phf.us-east-2.rds.amazonaws.com",
      "acme-aws-beta-network.vbjrxfom0phf.us-east-2.rds.amazonaws.com",
      "acme-demo.vbjrxfom0phf.us-east-2.rds.amazonaws.com",
      "acme-dev.vbjrxfom0phf.us-east-2.rds.amazonaws.com"</code></p>
  
  <p>I only want the one endpoint that is in the same VPC as the instance I am running the CLI command from.</p>
  
  <p>Thanks!</p>
  
  <p>Ernie</p>