Elastic beanstalk is creating security groups in default vpc instead of the vpc specified

0

I'm trying the Elastic Beanstalk with a single instance in AWS Console. I have my own VPC with two public and two private subnets. I have created two security groups one for the web server instances and one for database. I'm creating a beanstalk environment with the sample PHP app on a single instance (means I am not uploading any source bundle). I'm specifying the VPC I created and select the subnets I created and Security Groups I created. But in spite of that Beanstalk is creating two security groups in the default VPC and adding it to the launch configuration. The environment launch fails with the following error: The following resource(s) failed to create: [AWSEBAutoScalingGroup]. Group did not stabilize. {current/minSize/maxSize} group size = {0/1/1}. Failed Scaling Activity: The parameter SecurityGroup is not recognized. Launching EC2 instance failed. If I try to modify the environment using the Edit option and unchecking the Security group created by EB, it gives the following error: Environment named eb-demo-app-dev is in an invalid state for this operation. Must be Ready.

How do I resolve this?

Velu
질문됨 8달 전565회 조회
1개 답변
0

try this:

Check the security group name. Make sure that the security group name is spelled correctly and that it matches the name of the security group that you created. Check the VPC. Make sure that the security group is in the same VPC as the environment. You can do this by going to the Elastic Beanstalk console and selecting the environment. In the Details pane, look for the VPC ID. The security group must be in the same VPC as the environment VPC ID. Create a new security group. If the security group name is correct and the security group is in the same VPC as the environment, you can try creating a new security group and specifying that security group in the Elastic Beanstalk launch configuration. To create a new security group, go to the AWS EC2 console and select Security Groups. Click Create security group. Enter a name for the security group and select the VPC that you want to associate the security group with. Click Create.

Once you have created the new security group, you need to add the inbound rules that you need. For example, if you are running a web server, you will need to add an inbound rule that allows HTTP traffic from the internet.

Once you have added the inbound rules, you can specify the new security group in the Elastic Beanstalk launch configuration. To do this, go to the Elastic Beanstalk console and select the environment. In the Configuration pane, scroll down to the Launch configuration section. In the Security groups field, enter the name of the new security group.

Click Save. Elastic Beanstalk will use the new security group when it launches the environment.

profile picture
답변함 8달 전
profile picture
전문가
검토됨 한 달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠