Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon RDS Endpoint internal

Tags:

amazon-ec2

rds

How can I make ec2 instance communicate with rds instance on aws by internal ip address or dns? I only see public dns like xxx.cehmrvc73g1g.eu-west-1.rds.amazonaws.com:3306 Will internal ipaddress will be faster than public dns?

Thanks

like image 223
Jerry Pham Avatar asked Jan 13 '14 10:01

Jerry Pham


1 Answers

A note for posterity, ensure that you enable DNS on the VPC Peering link! enter image description here

Enabling DNS Resolution Support for a VPC Peering Connection

To enable a VPC to resolve public IPv4 DNS hostnames to private IPv4 addresses when queried from instances in the peer VPC, you must modify the peering connection.

Both VPCs must be enabled for DNS hostnames and DNS resolution.

To enable DNS resolution support for the peering connection

  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

  2. In the navigation pane, choose Peering Connections.

  3. Select the VPC peering connection, and choose Actions, Edit DNS Settings.

  4. To ensure that queries from the peer VPC resolve to private IP addresses in your local VPC, choose the option to enable DNS resolution for queries from the peer VPC.

  5. If the peer VPC is in the same AWS account, you can choose the option to enable DNS resolution for queries from the local VPC. This ensures that queries from the local VPC resolve to private IP addresses in the peer VPC. This option is not available if the peer VPC is in a different AWS account.

  6. Choose Save.

  7. If the peer VPC is in a different AWS account, the owner of the peer VPC must sign into the VPC console, perform steps 2 through 4, and choose Save.

like image 185
Felipe Alvarez Avatar answered Sep 30 '22 18:09

Felipe Alvarez