AWS RDS VPC 安全

AWS RDS VPC Security

如果出现以下任何情况,有人可以确认安全福利吗:

I have an Internet facing Web Server in a VPC, this is peered to another VPC running an application firewall.

The Web Server will talk to an RDS instance which will only be accessible by the application and a management server (for support purposes, hosted in another VPC).

问题是 - RDS 实例应该放在与 Web 服务器相同的 VPC 上还是托管在单独的 VPC 中

这完全取决于您!一般来说,除非有理由,否则你应该尽量减少复杂性。

将数据库放在单独的 VPC 中绝对是大材小用。有时人们将数据库放在 私有子网 中以增加额外的安全层。

您当然应该像这样配置 安全组

  • 与允许来自 Internet (0.0.0.0/0) 的所需流量(例如 HTTP、HTTPS)的 Web 服务器关联的 Web 服务器安全组 (Web-SG)
  • 与 RDS 实例关联的数据库安全组 (DB-SG) 允许来自 Web-SG
  • 的所需端口上的入站流量

也就是说,DB-SG 允许通过具体引用 Web-SG(而不是 IP 地址)从 Web-SG 进行入站访问。这意味着任何与 Web-SG 关联的 EC2 实例都将被允许访问数据库。