Table Of Contents


User Guide

First time using the AWS CLI? See the User Guide for help getting started.

Note: You are viewing the documentation for an older major version of the AWS CLI (version 1).

AWS CLI version 2, the latest major version of AWS CLI, is now stable and recommended for general use. To view this page for the AWS CLI version 2, click here. For more information see the AWS CLI version 2 installation instructions and migration guide.

[ aws . cloud9 ]



Creates an Cloud9 development environment, launches an Amazon Elastic Compute Cloud (Amazon EC2) instance, and then connects from the instance to the environment.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.


--name <value>
[--description <value>]
[--client-request-token <value>]
--instance-type <value>
[--subnet-id <value>]
[--image-id <value>]
[--automatic-stop-time-minutes <value>]
[--owner-arn <value>]
[--tags <value>]
[--connection-type <value>]
[--dry-run | --no-dry-run]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]


--name (string)

The name of the environment to create.

This name is visible to other IAM users in the same Amazon Web Services account.

--description (string)

The description of the environment to create.

--client-request-token (string)

A unique, case-sensitive string that helps Cloud9 to ensure this operation completes no more than one time.

For more information, see Client Tokens in the Amazon EC2 API Reference .

--instance-type (string)

The type of instance to connect to the environment (for example, t2.micro ).

--subnet-id (string)

The ID of the subnet in Amazon VPC that Cloud9 will use to communicate with the Amazon EC2 instance.

--image-id (string)

The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance. To choose an AMI for the instance, you must specify a valid AMI alias or a valid Amazon EC2 Systems Manager (SSM) path.

The default AMI is used if the parameter isn't explicitly assigned a value in the request. Because Amazon Linux AMI has ended standard support as of December 31, 2020, we recommend you choose Amazon Linux 2, which includes long term support through 2023.

AMI aliases
  • **Amazon Linux (default): amazonlinux-1-x86_64 **
  • Amazon Linux 2: amazonlinux-2-x86_64
  • Ubuntu 18.04: ubuntu-18.04-x86_64
SSM paths
  • **Amazon Linux (default): resolve:ssm:/aws/service/cloud9/amis/amazonlinux-1-x86_64 **
  • Amazon Linux 2: resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64
  • Ubuntu 18.04: resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64

--automatic-stop-time-minutes (integer)

The number of minutes until the running instance is shut down after the environment has last been used.

--owner-arn (string)

The Amazon Resource Name (ARN) of the environment owner. This ARN can be the ARN of any IAM principal. If this value is not specified, the ARN defaults to this environment's creator.

--tags (list)

An array of key-value pairs that will be associated with the new Cloud9 development environment.


Metadata that is associated with Amazon Web Services resources. In particular, a name-value pair that can be associated with an Cloud9 development environment. There are two types of tags: user tags and system tags . A user tag is created by the user. A system tag is automatically created by Amazon Web Services services. A system tag is prefixed with "aws:" and cannot be modified by the user.

Key -> (string)

The name part of a tag.

Value -> (string)

The value part of a tag.

Shorthand Syntax:

Key=string,Value=string ...

JSON Syntax:

    "Key": "string",
    "Value": "string"

--connection-type (string)

The connection type used for connecting to an Amazon EC2 environment. Valid values are CONNECT_SSH (default) and CONNECT_SSM (connected through Amazon EC2 Systems Manager).

For more information, see Accessing no-ingress EC2 instances with Amazon EC2 Systems Manager in the Cloud9 User Guide .

Possible values:


--dry-run | --no-dry-run (boolean)

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.


To create an AWS Cloud9 EC2 development environment

This example creates an AWS Cloud9 development environment with the specified settings, launches an Amazon Elastic Compute Cloud (Amazon EC2) instance, and then connects from the instance to the environment.


aws cloud9 create-environment-ec2 --name my-demo-env --description "My demonstration development environment." --instance-type t2.micro --subnet-id subnet-1fab8aEX --automatic-stop-time-minutes 60 --owner-arn arn:aws:iam::123456789012:user/MyDemoUser


  "environmentId": "8a34f51ce1e04a08882f1e811bd706EX"


environmentId -> (string)

The ID of the environment that was created.