如何为 EBS 和 RDS 创建 VPC? [英] How can I create a VPC for EBS and RDS?

查看:17
本文介绍了如何为 EBS 和 RDS 创建 VPC?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我制作了一个 Django 应用程序并将其部署在 Elastic Beanstalk 上.我也用 RDS 制作了一个 Postgres DB.我想将这两个添加到 VPC.

我使用 VPC 向导(具有公共和私有子网的 VPC)创建了 VPC:顾名思义,它创建了一个公共和一个私有专有网络.

有人告诉我

用于测试的 RDS SG 示例:

I made a Django app and deployed it on Elastic Beanstalk. I made a Postgres DB with RDS as well. I want to add both of these to a VPC.

I created the VPC using the VPC wizard (VPC with Public and Private Subnets): which created, as the name suggests, one public and one private VPC.

I was told here that I need to add a second private subnet for RDS. Now I have:

1 public subnet (10.0.0.0/24)
2 private subnets (10.0.1.0/24 and 10.0.10.0/24)

I also know that from here that I needed to "modify the route table of the new private subnet to point to the NAT gateway". However, I am not sure what that means. Right now, here is what my route tables look like:

One for the public subnet
One for the private subnet (main)

Also, after configuring this, what do I need to do to add my RDS to this? Should I just make a subnet group with these 2 private subnets and set it when configuring the RDS? I think I know how to do EBS using CLI.

Please let me know if you need any more information! Thanks!

解决方案

For the private subnets your route tables should point 0.0.0.0/0 to NAT gateway, as shown on the screenshot:

Example SG for RDS for testing:

这篇关于如何为 EBS 和 RDS 创建 VPC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆