How to get the IP address of an RDS instance in AWS

I got the same answer on the Internet as the question of how to get the IP address of an RDS instance in AWS, but I don’t know what dig and how to use it.

How to assign an IP address in a VPC for an RDS instance?

Please help me find the IP address of my RDS instance in AWS.

Thanks in advance

+10
amazon- vpc rds
source share
4 answers

It does not display the IP address on the configuration page for the RDS instance, since RDS IP is dynamic in nature. You can dig for them if you need them, but you'd better use a server using the DNS endpoint for the instance. This remains static and can be found in the details tab of the RDS instance in AWS.

+4
source share

The IP address of your AWS instance will be the IP address of the RDS instance.

If your host name for your AWS instance is blah.blah.amazonaws.com , you can use the dig command (on Linux computers) or the ping command on Windows and Linux to find out the host IP address:

ping blah.blah.amazonaws.com

This will return the host IP address (something like this):

 c:\ping www.google.com Pinging www.google.com [216.58.210.100] with 32 bytes of data: Reply from 216.58.210.100: bytes=32 time=14ms TTL=58 Reply from 216.58.210.100: bytes=32 time=15ms TTL=58 Reply from 216.58.210.100: bytes=32 time=14ms TTL=58 

Thus, the IP address of www.google.com is 216.58.210.100. dig will give you more output, but there is also an IP address. But sometimes the actual IP address of your AWS instance is actually in the hostname itself. For example:

ip-12-34-56-78.us-west-2.compute.internal

The IP address 12.34.56.78 already in the name (depending on your instance). You can find the host name in the AWS / Dashboard.

+2
source share

I also searched for the same, but could not find anything. AWS does not provide the private and public address of the RDS instance, but only the endpoint, which is most likely a long domain name.

0
source share

Use this one:

SELECT inet_server_addr ();

0
source share

All Articles