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
asked 8 months ago543 views
1 Answer
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
answered 8 months ago
profile picture
EXPERT
reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions