如何使用CLI为Elastic Beanstalk配置VPC [英] How to configure VPC for Elastic Beanstalk using CLI
问题描述
我可以使用此命令和eb-cli
一起使用VPC
创建一个Elastic Beanstalk
环境:
I am able to create an Elastic Beanstalk
environment with a VPC
using this command with eb-cli
:
eb create --vpc
这要求我配置几个选项:
This asks me to configure several options:
Enter an RDS DB username (default is "ebroot"): ...
Enter an RDS DB master password: ...
Retype password to confirm: ...
Enter the VPC ID: ...
Do you want to associate a public IP address? (Y/n): ...
Enter a comma-separated list of Amazon EC2 subnets: ...
Enter a comma-separated list of Amazon ELB subnets: ...
Do you want the load balancer to be public? (Select no for internal) (Y/n): ...
Enter a comma-separated list of Amazon VPC security groups: ...
Creating application version archive ...
我已通过该线程创建了一个具有子网的VPC,并在其中添加了RDS实例在这里(谢谢@Marcin!).但是,有些事情让我感到困惑:
I have created a VPC with subnets and added an RDS instance to it following this thread here and here (thank you @Marcin!). But, there are a few things that I am confused about:
- 什么是您要关联公共IP地址?"
- 我记得为VPC创建了子网,但是我想为"EC2子网" 和"ELB子网" 添加什么?我应该从我的VPC中添加这些内容吗?
- 对于您要让负载均衡器公开吗?" ,这到底是什么意思?我假设public意味着它在Internet上是公共的,而private意味着我只能在VPC中访问它?
- 对于输入逗号分隔的Amazon VPC安全组列表" ,我是否需要在此处添加任何内容?
- What is "Do you want to associate a public IP address?"
- I remember creating subnets for my VPC, but what does it want me to add for the "EC2 subnets" and the "ELB subnets"? Should I add the ones from my VPC?
- For "Do you want the load balancer to be public?", what does this exactly mean? I am assuming that public means that it is public on the internet, whereas private means I can only access it in the VPC?
- For "Enter a comma-separated list of Amazon VPC security groups", do I need to add anything here?
我知道这些都是开放式的,但是希望这对某人有帮助!
I know these are pretty open ended, but hopefully this helps someone!
推荐答案
基于聊天讨论和评论.
- 什么是您要关联公共IP地址?"
对于单实例EB env,它应该位于具有公共IP的公共子网中.
For single instance EB env, it the EB should be in a public subnet with public IP.
- 我记得为我的VPC创建了子网,但是我想为"EC2子网"添加什么?和"ELB子网"?我应该从我的VPC中添加这些内容吗?
对于负载平衡的EB env,您的负载平衡器应该位于公共子网中,而实例可以位于私有子网中.
For Load-balanced EB env, your load balancer should be in public subnets, while instances can be in private.
- 对于您想让负载均衡器公开吗?",这到底是什么意思?我假设public意味着它在Internet上是公共的,而private意味着我只能在VPC中访问它?
负载均衡器必须位于公共子网中.否则,您将无法从互联网连接到您的网站.
Load balancer must be in public subnets. Without that, you won't be able to connect to your website from the internet.
- 对于输入逗号分隔的Amazon VPC安全组列表",我是否需要在此处添加任何内容?
您可以使用默认值,但以后可能需要对其进行调整.
You can use default ones, but may need to adjust them later if needed.
这篇关于如何使用CLI为Elastic Beanstalk配置VPC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!