SSH environment host requirements - AWS Cloud9

AWS Cloud9 is no longer available to new customers. Existing customers of AWS Cloud9 can continue to use the service as normal. Learn more

SSH environment host requirements

To instruct AWS Cloud9 to connect an environment to an existing cloud compute instance or your own server, you create an AWS Cloud9 SSH development environment. However, before you create an SSH environment, consider the benefits of creating EC2 environments instead.

When you create an EC2 environment, AWS Cloud9 creates a new environment, requests Amazon EC2 to launch a new instance, and then connects the newly launched instance to the new environment. Creating an EC2 environment has the following benefits:

  • Automatic instance launching. When you create an EC2 environment, AWS Cloud9 requests Amazon EC2 to create a new instance at the same time. In an SSH environment, you must provide an existing cloud compute instance (for example, an Amazon EC2 instance) or your own server yourself.

  • Automatic instance shutdown. By default, AWS Cloud9 automatically shuts down the EC2 environment 30 minutes after all web browser instances that are connected to the IDE for the EC2 environment are closed. You can change this behavior at any time. This helps reduce the possibility of having additional charges applied to your AWS account for using Amazon EC2.

  • Automatic instance cleanup. When you delete an EC2 environment, the connected Amazon EC2 instance is automatically deleted. This also helps reduce the possibility of additional charges applied to your AWS account for using Amazon EC2. In an SSH environment that's connected to a cloud compute instance, you must remember to delete the instance yourself.

  • AWS managed temporary credentials. For an EC2 environment, you can easily turn on or off all AWS actions for all AWS resources in the caller's AWS account (with some restrictions). You can don't need to configure instance profiles for your environment's Amazon EC2 instance or store permanent AWS access credentials of an AWS entity (for example, an IAM user).

    For more information, see AWS managed temporary credentials.

  • AWS Toolkit and Git panel. These tools for interacting with AWS services and using visual source control are available only in AWS Cloud9 environments that are created with an Amazon EC2 instance.

If you want to create an EC2 environment instead, see Creating an EC2 Environment. Otherwise, continue reading for information about creating SSH environments.

When and how to create an SSH Environment

You must create an SSH environment instead of an EC2 environment whenever you have any of the following requirements:

Requirement Directions

You don't want to incur additional charges to your AWS account for using AWS Cloud compute instances. So, you decide to connect AWS Cloud9 to an existing cloud compute instance outside of AWS or your own server instead.

  1. Make sure your instance or server meets the requirements that are described later in this topic.

  2. Create an SSH environment for AWS Cloud9 to connect your instance or server to.

You want to use an existing AWS cloud compute instance (for example, an Amazon EC2 instance) in your AWS account instead of having AWS Cloud9 to launch a new instance at the same time the environment is created.

  1. Make sure the instance meets the requirements that are described later in this topic.

  2. Create an SSH environment for AWS Cloud9 to connect the instance to.

You want to use an Amazon EC2 instance type that AWS Cloud9 currently doesn't support for an EC2 environment (for example, R4).

  1. Launch an Amazon EC2 instance based on your desired instance type. Or, identify an existing instance in your AWS account that runs the desired instance type.

  2. Make sure the instance meets the requirements that are described later in this topic.

  3. Create an SSH environment for AWS Cloud9 to connect the instance to.

You want to use an Amazon EC2 instance that's based on an Amazon Machine Image (AMI) other than Amazon Linux or Ubuntu Server.

  1. Launch an Amazon EC2 instance based on your desired AMI. Or, identify an existing instance in your AWS account that's based on your desired AMI.

  2. Make sure the instance meets the requirements that are described later in this topic.

  3. Create an SSH environment for AWS Cloud9 to connect the instance to.

You want to connect multiple environments to a single existing cloud compute instance or your own server.

  1. Make sure the instance or server meets the requirements that are described later in this topic.

  2. Create an SSH environment for each environment you want AWS Cloud9 to connect the instance or server to.

Note

Launching an Amazon EC2 instance might result in possible charges to your AWS account for Amazon EC2. For more information, see Amazon EC2 Pricing.

SSH host requirements

The existing cloud compute instance or your own server must meet the following requirements for AWS Cloud9 to connect it to an SSH environment.

  • It must run Linux. (AWS Cloud9 doesn't support Windows.)

  • It must not use an Arm-based architecture. (Support for systems built around Arm processors is under review.)

  • It must be reachable over the public internet by using SSH. If it's reachable only through a virtual private cloud (VPC) or virtual private network (VPN), that VPC or VPN must have access to the public internet.

  • If the host is an existing AWS Cloud compute instance that's part of an Amazon Virtual Private Cloud (Amazon VPC), there are additional requirements. For more information, see Amazon VPC Settings.

  • It must have Python3 installed and set as the default Python version and pip3 when installing AWS Cloud9. To check the version, from the terminal of an existing instance or your server, run the command python --version. To install Python on the instance or server, see one of the following resources:

    Note

    To connect to an existing AWS Cloud compute instance to verify and meet requirements, see one or more of the following resources:

    To connect to your own server to verify and meet requirements, search the internet using a phrase such as "connect to a server by using the SSH command" (from macOS or Linux) or "connect to a server by using PuTTY" (from Windows).

  • Run the following command to install all required packages.

    For Amazon Linux:

    sudo yum install -y make glibc-devel gcc gcc-c++

    For Ubuntu Server:

    sudo apt install build-essential
  • It must have Node.js installed. We recommend installing the latest Node.js version supported by the host's operating system.

    Warning

    AWS Cloud9 installation problems might occur when creating an SSH environment if you use a Node.js version that's not supported by AWS Cloud9.

    To check your version, from the terminal of the existing instance or your server, run the command node --version . To install Node.js on the instance or server, see one of the following resources:

  • The path to the directory on the existing instance or server that you want AWS Cloud9 to start from after login must have its access permissions set to rwxr-xr-x. This means that read-write-run permissions for the owner that corresponds to the login name that you specify in the create environment wizard for User on the Configure settings page, read-run permissions for the group that this owner belongs to, and read-run permissions for others.

    For example, if the directory's path is ~ (where ~ represents the home directory for the login name that you specify for User on the Configure settings page), you can set these permissions on the directory by running the chmod command on the instance or server using the following command and instructions that follow.

    sudo chmod u=rwx,g=rx,o=rx ~
  • Download and run the AWS Cloud9 Installer on the existing instance or server.

  • Optionally, you can restrict inbound traffic over SSH to only the IP addresses that AWS Cloud9 uses. To do this, set inbound SSH traffic to the IP ranges as described in Inbound SSH IP address ranges for AWS Cloud9.

After you're sure your instance or server meets the preceding requirements, create an SSH environment for AWS Cloud9 to connect it to.