Can't delete Beanstalk environment due to security group's dependencies

0

I configured an Elastic Beanstalk environment + app with the bespoke interface (no cloudformation) utilizing only a single EC2 instance. It worked, but when I used "Actions > Rebuild environment" for some reason it stopped working and remained in an "invalid state", so I can't restart the app or rebuild it again.

I was able to stop and terminate the associated EC2 instance, but can't terminate the environment because it says that the associated Security group "has a dependent object". At this point, I tried to change the Security group in Beanstalk's configuration, but it's not possible because the Environment is in an invalid state.

Then tried to directly delete the security group, but that's not possible because "1 network interface associated. Delete the network interface, or associate with a different security group". In the end, the only available action was removing all the inbound/outbound rules.

So I tried to detach, and disassociate the network interface, but it responds "You do not have permission to access the specified resource.", and I logged in with the root account too. The network interface is associated with the default SG too. At this point, I don't know anymore what to try.

2 Answers
1
Accepted Answer

Hi There

Please check this support article https://aws.amazon.com/premiumsupport/knowledge-center/elastic-beanstalk-deletion-failure/

Specifically, make sure you are following the instructions for finding any dependencies on the SG (Step 4)

Also, can you clarify what you mean by

I configured an Elastic Beanstalk environment + app with the bespoke interface (no cloudformation)

Have you checked the CloudFormation console for any EB stacks?

profile pictureAWS
EXPERT
Matt-B
answered 2 years ago
profile picture
EXPERT
reviewed 4 months ago
0

Thank you, it worked. I still have a ghost security group but I've been able to clean EB and CF.

answered 2 years 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