How does EC2 hop to a publicly accessible RDS endpoint?

0

Hey team, say I have an RDS endpoint that's publicly available. I then access this endpoint from an EC2 instance.

What happens at the network layer? Does the request go to the public internet? Ideally, the system would know that the we're inside the same vpc and hop right over. How could I confirm this?

1 回答
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.

AWS
审核人员
philaws
已回答 1 年前
profile pictureAWS
专家
已审核 1 年前
  • 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.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则