0

Not able access the RDS instance from the EC2 instance, if we set the publicly access to 'No'. As per my understanding the EC2 instance should be accessible within the network and should be blocked outside network.

4

1 回答 1

0

将您的数据库实例设置为“公共”只是允许从外部访问它。将其设置为 no 并不意味着您的 VPC 中的所有内容都可以访问它。

您仍然需要允许从您的 EC2/Beanstalk 实例访问此数据库实例。编辑数据库的安全组时,打开正确的端口(mysql 为 3306,postgres 为 5432 等)并授予对EC2/beanstalk 实例所在的安全组的访问权限。

换句话说,您不需要(或不想)通过 IP 地址打开对数据库的访问。请改用安全组。

于 2015-03-02T20:10:53.853 回答