Bill Noble
Bill Noble

Reputation: 6744

AWS won't let me terminate an environment

I am trying to terminate an Elastic Beanstalk environment but it fails due to:

Deleting security group named: awseb-e-gpxusz64rm-stack-AWSEBSecurityGroup-1QZI37JXP423J failed Reason: resource sg-d25608b7 has a dependent object

Is there a way to force the environment to terminate?

Upvotes: 1

Views: 1090

Answers (1)

James
James

Reputation: 11931

The Security Group will not be deleted as long as it's in use, most typically that means active instances in the group. Elastic Beanstalk will remove it's own instances, and usually this works smoothly. Sometimes you have to manually help it a bit.

It is also possible that there are instances or other resources not managed by Elastic Beanstalk that have been launched into the Security Group. Take a look in the EC2 Instances section of the AWS Management Console to see what is attached to that security group. The quick way is to paste the Security Group name, awseb-e-gpxusz64rm-stack-AWSEBSecurityGroup-1QZI37JXP423J into the filter search and let AWS give you the list.

An RDS database instance might also be the problem.

One thing that helps me manage Elastic Beanstalk stuff is to add a column to the console UI for the EB environment name. Click the "Show/Hide Columns" button (gear icon) in the top right, and look for tag keys like elasticbeanstalk:environment-name that can help you zero in on the right EB artifacts. This works for both instances and security groups.

Upvotes: 2

Related Questions