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 個答案
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
專家
已回答 2 個月前
profile picture
專家
已審閱 2 個月前
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
專家
Steve_M
已回答 2 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南