AWS CDK Cloud9 Alpha

raw JSON →
2.252.0a0 verified Fri May 01 auth: no python

AWS CDK L2 construct library for AWS Cloud9, currently in alpha (v2.252.0a0). Follows CDK alpha release cadence; breaking changes can occur at any time.

pip install aws-cdk-aws-cloud9-alpha
error ModuleNotFoundError: No module named 'aws_cdk.aws_cloud9_alpha'
cause Alpha module not installed or imported incorrectly.
fix
Install with pip install aws-cdk-aws-cloud9-alpha and import from aws_cdk.aws_cloud9_alpha.
error TypeError: __init__() got an unexpected keyword argument 'instance_type'
cause Missing import of the L2 construct; possibly using CfnEnvironmentEC2 instead.
fix
Ensure you import EnvironmentEC2 (not CfnEnvironmentEC2) for the L2 construct.
breaking Alpha modules do not follow semantic versioning; may have breaking changes in minor/patch releases.
fix Pin exact version in requirements.txt. Test before upgrading.
gotcha The alpha module must be imported from aws_cdk.aws_cloud9_alpha, not aws_cdk.aws_cloud9.
fix Use from aws_cdk.aws_cloud9_alpha import ...
deprecated EnvironmentEC2's 'description' property was deprecated in favor of 'environmentName'.
fix Use 'environment_name' parameter instead.

Creates a basic Cloud9 environment using the alpha L2 construct.

import aws_cdk as cdk
from aws_cdk.aws_cloud9_alpha import EnvironmentEC2

app = cdk.App()
stack = cdk.Stack(app, 'MyStack')

env = EnvironmentEC2(stack, 'MyCloud9Env',
    instance_type='t2.micro',
    image_id='amazonlinux-2-x86_64'
)

app.synth()