问题
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!
回答1:
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:
来源:https://stackoverflow.com/questions/62963105/how-can-i-create-a-vpc-for-ebs-and-rds