Reputation: 573
I have a problem with AWS Elastic Beanstalk. I tried to delete an environment. It started the process, but after a few minutes the environment "health bar" went to grey and gave me the following errors:
"Deleting security group named: XXXXX failed Reason: resource YYYYY has a dependent object"
"Stack deletion failed: The following resource(s) failed to delete: [AWSEBSecurityGroup]."
I tried to delete the security group from the error message, but I got this:
"XXXXXX: resource XXXXX has a dependent object"
After this I wanted to delete the dependence from the EB environment, but because it's Grey, it didn't allow me to do that.
I browsed the internet for hours, found a possible solution, where I need to do something at the EC2's Network Interfaces page, but it doesn't say any specific option or information.
Upvotes: 57
Views: 36080
Reputation: 11479
In my case i have white list EBS instance into RDS security group , so deleted from RDS solved problem.
Upvotes: 0
Reputation: 21
Had this happen where I was using the security group created by EB with a non-eb created RDS instance.
I modified the RDS instance to stop using the EB-created security group and was able to do a successful termination of the environment and application. I used the eb cli 3.x and eb terminate --all --force to get a fresh start on the application.
Upvotes: 2
Reputation: 1061
Try this, I was suggested by AWS support and it worked for me.
Upvotes: 68
Reputation: 27486
In case this happens due to a similar error but due to RDS attached to this,
Stack deletion failed: The following resource(s) failed to delete: [AWSEBRDSDatabase].
This happens when you terminate the RDS instance manually from RDS listing console. I resolved this by launching another instance with the same DB instance ideIntifier
name.
Once this is created, you can terminate the Elastic Beanstalk environment successfully. This works.
Upvotes: 8
Reputation: 29749
EC2
under AWS console's Compute
Security Groups
under NETWORK & SECURITY
on the sidebarDelete Security Group
from the Actions
menuMake sure you don't delete any important Security Groups or Instances!
Upvotes: 13
Reputation: 3149
Use https://github.com/mingbowan/sgdeps to find your security group dependencies and then break the dependencies.
Upvotes: 6
Reputation: 2142
Is the security group being referenced by RDS or something in S3? If that is the case, you'll have to delete the dependency in either RDS or S3.
The error message is saying something outside of your environment is still using the security group and it can't be deleted for this reason.
Upvotes: 44