17

I moved my Master/slave database architecture to Amazon RDS and everything works fine.

But I have a slave out of the RDS service which should keep sync with the new Master server, to do so I have to point my DB domain name master-db.myawsserver.com on the Master (RDS) private address IP.

AWS console didn't provide this information and I am connected directly to the MySQL database.

ZygD
  • 317
  • 1
  • 3
  • 11
Imad Touil
  • 273
  • 1
  • 2
  • 5

3 Answers3

26

RDS instances can change their IPs unexpectedly, so they should not be used nor are they provided in the console or API (although you can technically dig for them). The DNS endpoint provided in the AWS console will resolve to the internal IPs from within Amazon's network.

ceejayoz
  • 32,469
  • 7
  • 81
  • 105
10

You can find a required info in the EC2 console.

  1. Go to RDS Console
  2. Select Databases and find required DB Instance. Open it and find details
  3. Go to Connectivity & security and find VPC security groups
  4. Go to EC2 Console
  5. Select NETWORK & SECURITYNetwork Interfaces
  6. Filter by Security Group or just find an interface by Security group from 3rd point
  7. Select found interface and look at Primary private IPv4 IP. This is internal ip-address which you required
-2

its pretty easy, telnet your RDS endpoint using command prompt on windows or through unix terminal

for example: telnet "you RDS endpoint" "Port"

trying to connect "You get your RDS internal IP here"

Rohan
  • 1
  • See my answer. You should never directly use the IP, as it can change without warning. – ceejayoz Sep 27 '16 at 14:16
  • 1
    There are simpler ways to do reach the same thing (even more so since telnet is not installed in default installations of windows nowadays if I'm not mistaken). If you want to get the IP address associated with a hostname or FQDN you'd be better off using `ping` or `nslookup` which are default even on newer Windows systems. – pacey Sep 27 '16 at 17:19