AWS::Cloud9::EnvironmentEC2 - AWS CloudFormation

AWS::Cloud9::EnvironmentEC2

The AWS::Cloud9::EnvironmentEC2 resource creates an Amazon EC2 development environment in AWS Cloud9. For more information, see Creating an Environment in the AWS Cloud9 User Guide.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::Cloud9::EnvironmentEC2", "Properties" : { "AutomaticStopTimeMinutes" : Integer, "ConnectionType" : String, "Description" : String, "ImageId" : String, "InstanceType" : String, "Name" : String, "OwnerArn" : String, "Repositories" : [ Repository, ... ], "SubnetId" : String, "Tags" : [ Tag, ... ] } }

YAML

Type: AWS::Cloud9::EnvironmentEC2 Properties: AutomaticStopTimeMinutes: Integer ConnectionType: String Description: String ImageId: String InstanceType: String Name: String OwnerArn: String Repositories: - Repository SubnetId: String Tags: - Tag

Properties

AutomaticStopTimeMinutes

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

Required: No

Type: Integer

Maximum: 20160

Update requires: Replacement

ConnectionType

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

Required: No

Type: String

Allowed values: CONNECT_SSH | CONNECT_SSM

Update requires: Replacement

Description

The description of the environment to create.

Required: No

Type: String

Maximum: 200

Update requires: No interruption

ImageId

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 AWS Systems Manager path.

The default AMI is used if the parameter isn't explicitly assigned a value in the request.

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

Required: No

Type: String

Maximum: 512

Update requires: Replacement

InstanceType

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

Required: Yes

Type: String

Minimum: 5

Maximum: 20

Pattern: ^[a-z][1-9][.][a-z0-9]+$

Update requires: Replacement

Name

The name of the environment.

Required: No

Type: String

Update requires: No interruption

OwnerArn

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

Required: No

Type: String

Pattern: ^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):(iam|sts)::\d+:(root|(user\/[\w+=/:,.@-]{1,64}|federated-user\/[\w+=/:,.@-]{2,32}|assumed-role\/[\w+=:,.@-]{1,64}\/[\w+=,.@-]{1,64}))$

Update requires: Replacement

Repositories

Any AWS CodeCommit source code repositories to be cloned into the development environment.

Required: No

Type: List of Repository

Update requires: Replacement

SubnetId

The ID of the subnet in Amazon Virtual Private Cloud (Amazon VPC) that AWS Cloud9 will use to communicate with the Amazon Elastic Compute Cloud (Amazon EC2) instance.

Required: No

Type: String

Minimum: 15

Maximum: 24

Pattern: ^(subnet-[0-9a-f]{8}|subnet-[0-9a-f]{17})$

Update requires: Replacement

Tags

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

Required: No

Type: List of Tag

Maximum: 200

Update requires: No interruption

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the ID of the development environment, such as 2bc3642873c342e485f7e0c561234567.

For more information about using the Ref function, see Ref.

Fn::GetAtt

The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

Arn

The Amazon Resource Name (ARN) of the development environment, such as arn:aws:cloud9:us-east-2:123456789012:environment:2bc3642873c342e485f7e0c561234567.

Name

The name of the environment.