I am able to access my RDS instance through my EC2 instance through
psql -U user -h hostname $DBname
I want to know how the RDS connects to EC2. is it private IP or public IP or Hostname
my developer has configured my private IP in connection http://privateip:5000 in the backend (don't what exactly it)
When I use this command:
curl --location --request GET 'http://localhost:5000/api/Supplier
I am able to access the API response.
but when I use my
curl --location --request GET 'http://privateip:5000/api/Supplier
I get curl: (7) Failed to connect to privateIp port 5000: Connection refused
I am sure my EC2 can connect to RDS .
Maybe my understanding of this is limited.
could any one help me out of this ?
My RDS SG
All TCP TCP 0 - 65535 Custom sg-EC2
PostgreSQL TCP 5432 Custom 0.0.0.0/0
PostgreSQL TCP 5432 custom sg-Ec2
All UDP UDP 0 - 65535 Custom sg-EC2
All ICMP - IPv4 ICMP 0 - 65535 Custom sg-EC2