Skip to content
v2.274.0

Experimental

@aws-cdk/aws-cloud9-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

Ec2EnvironmentProps Struct ​

Properties for Ec2Environment.

Example ​

ts
import * as iam from 'aws-cdk-lib/aws-iam';

const user = new iam.User(this, 'user');
user.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName('AWSCloud9Administrator'));
declare const vpc: ec2.Vpc;
new cloud9.Ec2Environment(this, 'C9Env', {
  vpc,
  imageId: cloud9.ImageId.AMAZON_LINUX_2,

  owner: cloud9.Owner.user(user)
})

Properties ​

automaticStopDurationautomatic_stopDurationautomaticStopDurationAutomaticStopDurationAutomaticStopDuration= The instance will not be shut do…#
The number of minutes until the running instance is shut down after the environment was last used.

Setting a value of 0 means the instance will never be automatically shut down."

default

Default: The instance will not be shut down automatically.

clonedRepositoriesCloneRepository[]cloned_repositoriestyping.List[CloneRepository]clonedRepositoriesList<CloneRepository>ClonedRepositoriesCloneRepository[]ClonedRepositories*[]CloneRepository= do not clone any repository#
The AWS CodeCommit repository to be cloned.
connectionTypeConnectionTypeconnection_typeConnectionTypeconnectionTypeConnectionTypeConnectionTypeConnectionTypeConnectionTypeConnectionType= CONNECT_SSH#
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)

descriptionstringdescriptionstrdescriptionStringDescriptionstringDescription*string= no description#
Description of the environment.
ec2EnvironmentNamestringec2_environment_namestrec2EnvironmentNameStringEc2EnvironmentNamestringEc2EnvironmentName*string= automatically generated name#
Name of the environment.
imageIdImageIdimage_idImageIdimageIdImageIdImageIdImageIdImageIdImageIdrequired#
The image ID used for creating an Amazon EC2 environment.
instanceTypeInstanceTypeinstance_typeInstanceTypeinstanceTypeInstanceTypeInstanceTypeInstanceTypeInstanceTypeInstanceType= t2.micro#
The type of instance to connect to the environment.
ownerOwnerownerOwnerownerOwnerOwnerOwnerOwnerOwner= The identity that CloudFormation…#
Owner of the environment.

The owner has full control of the environment and can invite additional members.

default

Default: The identity that CloudFormation executes under will be the owner

subnetSelectionSubnetSelectionsubnet_selectionSubnetSelectionsubnetSelectionSubnetSelectionSubnetSelectionSubnetSelectionSubnetSelectionSubnetSelection= all public subnets of the VPC ar…#
The subnetSelection of the VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
default

Default: all public subnets of the VPC are selected.

vpcIVpcvpcIVpcvpcIVpcVpcIVpcVpcIVpcrequired#
The VPC that AWS Cloud9 will use to communicate with the Amazon Elastic Compute Cloud (Amazon EC2) instance.