如何为Elastic Beanstalk设置VPC [英] How to set up a VPC for Elastic Beanstalk

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

问题描述

我想为我的Elastic Beanstalk Web应用设置一个 VPC RDS postgres数据库.我尝试创建VPC,但遇到了问题:

I want to set up a VPC for my Elastic Beanstalk web app and RDS postgres db. I tried creating a VPC but ran into problems:

我去了VPC on AWS-> Launch VPC Wizard-> VPC with Public and Private Subnets.我不确定要使用什么配置.例如,我应该设置Elastic IP Allocation ID?我需要设置VPC名称吗?

I went to VPC on AWS -> Launch VPC Wizard -> VPC with Public and Private Subnets. I am not sure what configurations to use. For example, what should I set Elastic IP Allocation ID? Do I need to set the VPC name?

创建此文件后,是否可以将其添加到EBS和RDS中?还是需要做其他事情?谢谢!

推荐答案

我需要设置VPC名称吗?

Do I need to set the VPC name?

它是可选的,但您可以使用,例如MyVPCforEB或您想要的.通过名称查找您的vpc比通过隐秘的vpc-id查找更容易.

Its optional, but you can use, e.g. MyVPCforEB or what you want. It easier to find your vpc by name, than by cryptic vpc-id.

我应该设置弹性IP分配ID

what should I set Elastic IP Allocation ID

您必须首先创建EIP.它在VPC -> Elastic IP addresses菜单中完成.这是NAT网关所必需的,以便私有子网中的实例可以访问Internet.

You have to create EIP first. Its done in VPC -> Elastic IP addresses menu. This is required for NAT gateway, so that instances in private subnet can access the internet.

创建此文件后,是否准备将其添加到EBS和RDS中,还是需要做其他事情?

After I create this, am I ready to just add it in EBS and RDS, or is there something else I need to do?

不是真的.要正确执行此操作,您需要再添加一个私有子网. VPC向导将仅创建一个专用子网.对于RDS,要创建一个子网组,您需要在不同的可用区域中至少有两个私有子网.

Not really. To do it properly, you would need to add one more private subnet. The VPC wizard will create only one private subnet. For RDS, to create a subnet group, you need to have at least two private subnets in different Availability Zones.

因此,一旦您在两个不同的可用区中拥有两个专用子网,便可以在带有子网的RDS中创建新的Subnet Group.这样,您可以在这两个子网中创建RDS.

Thus, once you have two private subnets in two different AZs, then you can create new Subnet Group in RDS with the subnets. Having this, you can create the RDS in these two subnets.

这篇关于如何为Elastic Beanstalk设置VPC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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