Amazon Web Service can't delete an Elastic Beanstalk environment

Try this, I was suggested by AWS support and it worked for me.

  • You need to go to your CloudFormation console and retry deletion of the CloudFormation stack which the Beanstalk environment used.
  • The deletion may fail, but after retrying it will prompt you if you want to skip the "AWSEBRDSDatabase" resource that failed to delete. You can just confirm that you want to skip deletion (since you have actually already deleted it).
  • This should remove the CloudFormation stack
  • Then you can retry deletion of the Beanstalk environment from the Beanstalk console.

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.


  1. Go to EC2 under AWS console's Compute
  2. Go to Security Groups under NETWORK & SECURITY on the sidebar
  3. Find your misbehaving security group on the page
  4. Check it and choose Delete Security Group from the Actions menu
  5. You will be presented with a link that will lead you to the security group or instances it depends on.
  6. Keep going until you get to the parent Security Group or instances and delete them.

Make sure you don't delete any important Security Groups or Instances!