Skip to content

orphaned environments

0

Dear Sir/Madam,

I have two orphaned environments called ‘django-env’ (id:e-43acmhvja6) and ‘Test-env’ (id:e-bpmh3z6chq). These were part of Elastic Beanstalk instances and I deleted first the applications and only afterwards tried to remove the environments which now refuse to be deleted because the application is no longer there. Can you remove them?

Best regards,

Machiel

asked a year ago175 views

1 Answer
0
Accepted Answer

When you delete an Elastic Beanstalk application before terminating its environments, the environments can sometimes remain in an orphaned state. There are a couple of approaches to resolve this situation:

  1. Wait for automatic cleanup: In some cases, if the application has been deleted, the associated environments will automatically disappear after some time (approximately 1 hour in past cases).

  2. Delete the underlying CloudFormation stack: If the environment status shows "No data," you can try deleting the CloudFormation stack that was created for your environment. Each Elastic Beanstalk environment has an associated CloudFormation stack (typically named something like "awseb-e-[environment-id]-stack").

For future reference, the recommended order for deletion is:

  1. Delete all application versions first
  2. Terminate the environment(s)
  3. Delete the application

This sequence helps prevent orphaned resources and ensures proper cleanup of all components.

If the automatic cleanup doesn't occur and you're unable to delete the CloudFormation stack yourself, you may need to contact AWS Support for assistance with removing these orphaned environments.
Sources
After deleting Elastic Beanstalk application, environment still remains | AWS re:Post
Learn how to get started with Elastic Beanstalk - AWS Elastic Beanstalk

answered a year ago

EXPERT

reviewed a year 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.