简体   繁体   English

AWS:如何为默认VPC创建专用子网

[英]AWS: how to create a private subnet to the default VPC

I am following the Hosting a Web App on Amazon Web Services tutorial. 我正在关注在Amazon Web Services上托管Web应用程序教程。

It says that the EC2 instance should be launched into a public subnet. 它说应该将EC2实例启动到公共子网中。 However, database Server should be launched into a private subnet. 但是,数据库服务器应启动到专用子网中。 But when I try to create the private subnet, I have problem choosing CIDR. 但是,当我尝试创建专用子网时,选择CIDR会遇到问题。 My default VPC is 172.31.0.0/16. 我的默认VPC是172.31.0.0/16。 If the CIDR is 172.31.x.0/16, it showed error that CIDR already existed. 如果CIDR为172.31.x.0 / 16,则表明存在CIDR错误。

For the purposes of the tutorial, feel free to create your database in a Public Subnet. 在本教程中,请随时在公共子网中创建数据库。

It is recommended best practice to launch private resources (which do not need to be accessed from the Internet) into a Private Subnet. 建议的最佳做法是将专用资源(不需要从Internet访问)启动到专用子网中。 However, rather than having to learn VPC at this stage in your learning process, feel free to create the database in the Public Subnet. 但是,不必在学习过程中的现阶段学习VPC,而可以在公共子网中随意创建数据库。

Later, when you have learned about VPCs, you can create your own VPC with public and private subnets for improved security. 稍后,当您了解VPC时,可以使用公共子网和私有子网创建自己的VPC,以提高安全性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM