Elastic Beanstalk CLI launches EC2 instance in a private subnet

0

I use the following command in 'eb cli' to launch an environment:

eb create django-env --vpc.id vpc-02aa477474b131595 --instance_type "t2.micro" --vpc.elbsubnets subnet-089ebed3884dd1aae,subnet-066970ae1c353cfa0 --vpc.ec2subnets subnet-066970ae1c353cfa0,subnet-089ebed3884dd1aae --vpc.securitygroup sg-0cd283febb838a4e4

Explaining what I entered exactly:

-vpc.id : A VPC with 4 subnets, 2 public and 2 private -instance_type: the free tier EC2 instance type -vpc.elbsubnets: the subnets the vpc would be launched in -vpc.ec2subnets: the subnets the EC2 instances would be launched in -vpc.securitygroup : security group of the VPC

When I launch the environment, the EC2s are launched in a private subnet How can I fix this?

2 Antworten
0

Hello.

Is the subnet specified in this option a private subnet?
In that case, I don't think it would be strange to start EC2 in a private subnet.
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-create.html

--vpc.ec2subnets subnet-066970ae1c353cfa0,subnet-089ebed3884dd1aae
profile picture
EXPERTE
beantwortet vor 2 Monaten
profile picture
EXPERTE
überprüft vor 2 Monaten
0

--vpc.elbsubnets subnet-089ebed3884dd1aae,subnet-066970ae1c353cfa0 --vpc.ec2subnets subnet-066970ae1c353cfa0,subnet-089ebed3884dd1aae

The ELB subnets are the same as the EC2 subnets, just in a different order.

Is this intended?

profile picture
EXPERTE
Steve_M
beantwortet vor 2 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen