1 Answer
- Newest
- Most votes
- Most comments
0
Assuming your ec2 instance is in the same VPC as the RDS database, then it will route using the private subnet. You can confirm this by using nslookup from the ec2 instance, you should get the private ip address.
Relevant content
- asked 2 years ago

This is a good way to check which IP address (public or private) the EC2 instance is obtaining. I'd also note that I would not be making a RDS endpoint public - that's definitely not a good security practice.