使用指定的VPC创建Elastic Beanstalk环境 [英] Creating Elastic Beanstalk environment with specified VPC
问题描述
我正在尝试使用AWS CLI创建Elastic Beanstalk环境
I'm trying to create an Elastic Beanstalk environment using the AWS CLI
aws elasticbeanstalk create-environment \
--application-name my-application \
--environment-name my-environment \
--region us-east-1 \
--solution-stack-name "64bit Amazon Linux 2015.09 v2.0.6 running Docker 1.7.1" \
--version-label my-version
但是这会将所有内容转储到默认的VPC中,而我想将其放入特定的(非默认)VPC中.我知道这可以通过AWS Web界面完成.可以通过CLI完成吗?创建环境文档中未提到选择VPC.
but this dumps everything into the default VPC, whereas I'd like to put it in a specific (non-default) VPC. I know this can be accomplished through the AWS web interface. Can it be accomplished with the CLI? Choosing a VPC is not mentioned in the create-environment docs.
推荐答案
Elastic Beanstalk拥有自己的CLI实施,它比集成到AWS CLI中的CLI实施要健壮得多.您可以在此处上阅读并下载它..然后,您可以按照以下方式使用eb cli来指定VPC:
Elastic Beanstalk has it's own CLI implementation that is much more robust than the one integrated into the AWS CLI. You can read more about it and download it here. Then, you can use the eb cli as follows to specify the VPC:
eb create \
--elb-type application \
--region us-east-1 \
--platform "64bit Amazon Linux 2015.09 v2.0.6 running Docker 1.7.1" \
--version my-version \
--vpc.id <vpc to launch into> \
my-environment-name
这篇关于使用指定的VPC创建Elastic Beanstalk环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!