Issues connecting to Postgres RDS instance from within a VPC

0

I have a RDS postgres instance in a VPC. The RDS instance is publicly accessible.
In the same VPC, I have an ubuntu instance. Both are using the same security group.

The security group allows ingress and egress TCP/UDP traffic on all ports for subnets within the VPC, and from my home IP address. The security group is also used for the VPC.

I setup the RDS db subnet group to use all subnets within the VPC.

I am unable to connect to postgres from the ubuntu instance. The connection times out.
But, I am able to connect from my home IP.

To debug, I added a rule to the VPC security group to allow ingress/egress TCP traffic on port 5432 (postgres) from the PUBLIC ip address of the ubuntu instance. Now, I can connect to the postgres instance from the ubuntu instance.

Is this what is expected? I that must go out and back in the i-gateway to get to the RDS instance?

What I am missing that should route the traffic directly between my ubuntu instance to the RDS instance?

Thanks for any help.

已提问 5 年前387 查看次数
1 回答
0

Found my issue. I had launched the VPC to host a domain controller and several windows servers that I imported from my local environment. My imported domain controller was responsible for resolving the host names within the VPC. My domain controller was not configured to work with AWS or RDS, so it was unaware of the local address for the RDS instance. I did not try to figure out how to make my domain controller work with AWS and RDS.

When I took a second look at what I was trying to achieve, it was better to move the Linux and RDS instances into a separate VPC. In this 2nd VPC, I allowed AWS to manage the DHCP and DNS as usual. In side this 2nd VPC things work just as I expected. I was able to access the RDS instance using a local route.

已回答 5 年前

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

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

回答问题的准则