AWS RDS public access

你说的曾经没有我的故事 提交于 2020-12-08 05:47:04

问题


I am stumped with AWS configuration. My goal is to create a database that's accessible from inside and outside the network.

Here is what I have. RDS instance runs postgresql. Connections from inside the VPC work correctly.

The endpoint is set up to be publicly accessible - and when accessed from the outside, does in fact resolve. However, the connection hangs, indicating the traffic is blocked by somebody.

Security group is good:
Inbound: Port 5432 from 0.0.0.0/0 Outbound: all from 0.0.0.0/0

Subnets. I assume that's where something is wrong, right? At first I had two private and two public subnets in the subnet group. To simplify, I removed the private ones without changing the outcome.

So we have two public subnets:

Both have the same route table with an Internet Gateway

As far as I can tell, everything is in working order... So who is blocking my database connection?


回答1:


Two things to check:

  1. Ensure that the RDS instance has the publicly accessible attribute set so that it is assigned a public address

  2. Also according to the AWS RDS docs, "If you want your DB instance in the VPC to be publicly accessible, you must enable the VPC attributes DNS hostnames and DNS resolution."

Also, check that the IP that your RDS instance hostname resolves to is a public IP address.




回答2:


As per new AWS RDS UI. Follow Following steps.

  1. Open the Amazon RDS console.
  2. Choose Databases from the navigation pane, and then select the DB instance.
  3. Choose Modify.
  4. Connectivity

Additionally[important]: inbound and outbound policy update with PORT and IPs



来源:https://stackoverflow.com/questions/31867896/aws-rds-public-access

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!