Menu
AWS Cloud9
User Guide

Deleting an Environment in AWS Cloud9

To prevent any ongoing charges to your AWS account related to an AWS Cloud9 development environment that you're no longer using, you should delete the environment.

Deleting an Environment with the Console

Warning

When you delete an environment, AWS Cloud9 deletes the environment permanently. This includes permanently deleting all related settings, user data, and uncommitted code. Deleted environments cannot be recovered.

  1. Sign in to the AWS Cloud9 console, at https://console.aws.amazon.com/cloud9/.

  2. In the top navigation bar, choose the AWS Region where the environment is located.

    
                  AWS Region selector in the AWS Cloud9 console
  3. In the list of environments, for the environment you want to delete, do one of the following.

    • Choose the title of the card for the environment. Then choose Delete on the next page.

      
                        Deleting an environment from the environment details page
    • Select the card for the environment, and then choose the Delete button.

      
                        Deleting an environment from the environments list
  4. In the Delete dialog box, type Delete, and then choose Delete.

    If the environment was an EC2 environment, AWS Cloud9 also terminates the Amazon EC2 instance that was connected to that environment.

    However, if the environment was an SSH environment, and that environment was connected to an Amazon EC2 instance, AWS Cloud9 doesn't terminate that instance. If you don't terminate that instance later, your AWS account might continue to have ongoing charges for Amazon EC2 related to that instance.

  5. If the environment was an SSH environment, AWS Cloud9 leaves behind a hidden subdirectory on the cloud compute instance or your own server that was connected to that environment. You can now safely delete that subdirectory if you want to. The subdirectory is named .c9. It is located in the Environment path directory that you specified when you created the environment.

    If your environment is not displayed in the console, try doing one or more of the following actions to try to display it.

    • In the side navigation bar, choose one or more of the following.

      • Choose Your environments to display all environments that your AWS entity owns within the selected AWS Region and AWS account.

      • Choose Shared with you to display all environments your AWS entity has been invited to within the selected AWS Region and AWS account.

      • Choose Account environments to display all environments within the selected AWS Region and AWS account that your AWS entity has permissions to display.

      
               Environment list scope in the AWS Cloud9 console
    • Choose the previous arrow, next arrow, or page number button to display more environments in the current scope.

      
               Environment list page control in the AWS Cloud9 console
    • If you think you should be a member of an environment, but the environment is not displayed in the Shared with you list, check with the environment owner.

    • In the top navigation bar, choose a different AWS Region.

      
               AWS Region selector in the AWS Cloud9 console

Deleting an Environment with Code

Warning

When you delete an environment, AWS Cloud9 deletes the environment permanently. This includes permanently deleting all related settings, user data, and uncommitted code. Deleted environments cannot be recovered.

To use code to delete an environment in AWS Cloud9, call the AWS Cloud9 delete environment operation, as follows.

AWS CLI

delete-environment

AWS SDK for C++

DeleteEnvironmentRequest, DeleteEnvironmentResult

AWS SDK for Go

DeleteEnvironment, DeleteEnvironmentRequest, DeleteEnvironmentWithContext

AWS SDK for Java

DeleteEnvironmentRequest, DeleteEnvironmentResult

AWS SDK for JavaScript

deleteEnvironment

AWS SDK for .NET

DeleteEnvironmentRequest, DeleteEnvironmentResponse

AWS SDK for PHP

deleteEnvironment

AWS SDK for Python (Boto)

delete_environment

AWS SDK for Ruby

delete_environment

AWS Tools for Windows PowerShell

Remove-C9Environment

AWS Cloud9 API

DeleteEnvironment