Terminate an Elastic Beanstalk environment - AWS Elastic Beanstalk

Terminate an Elastic Beanstalk environment

You can terminate a running AWS Elastic Beanstalk environment using the Elastic Beanstalk console to avoid incurring charges for unused AWS resources. For more information about terminating an environment using the AWS Toolkit for Eclipse, see Terminating an environment.


You can always launch a new environment using the same version later. If you have data from an environment that you want to preserve, create a snapshot of your current database instance before you terminate the environment. You can use it later as the basis for new DB instance when you create a new environment. For more information, see Creating a DB Snapshot in the Amazon Relational Database Service User Guide.

Elastic Beanstalk might fail to terminate your environment. One common reason for this failure is that another environment's security group has a dependency on the security group of the environment you're trying to terminate. A way to avoid this condition is described in Security groups on the EC2 Instances page of this guide.

Elastic Beanstalk console

To terminate an environment

  1. Open the Elastic Beanstalk console, and in the Regions list, select your AWS Region.

  2. In the navigation pane, choose Environments, and then choose the name of your environment from the list.


    If you have many environments, use the search bar to filter the environment list.

  3. Choose Environment actions, and then choose Terminate environment.

  4. Use the on-screen dialog box to confirm environment termination.


    When you terminate your environment, the CNAME associated with the terminated environment becomes available for anyone to use.

    It takes a few minutes for Elastic Beanstalk to terminate the AWS resources running in the environment.


To terminate an environment

  • Run the following command.

    $ aws elasticbeanstalk terminate-environment --environment-name my-env


To terminate an environment

  • Call TerminateEnvironment with the following parameter:

    EnvironmentName = SampleAppEnv

    https://elasticbeanstalk.us-west-2.amazon.com/?EnvironmentName=SampleAppEnv &Operation=TerminateEnvironment &AuthParams