wogsland
wogsland

Reputation: 9508

Creating Elastic Beanstalk environment with specified VPC

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

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.

Upvotes: 2

Views: 1350

Answers (1)

asdf
asdf

Reputation: 3067

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

Upvotes: 5

Related Questions