The CDK Construct Library for AWS::Cloud9
Project description
AWS Cloud9 Construct Library
---All classes with the
Cfn
prefix in this module (CFN Resources) are always stable and safe to use.
The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the Semantic Versioning model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
This module is part of the AWS Cloud Development Kit project.
AWS Cloud9 is a cloud-based integrated development environment (IDE) that lets you write, run, and debug your code with just a browser. It includes a code editor, debugger, and terminal. Cloud9 comes prepackaged with essential tools for popular programming languages, including JavaScript, Python, PHP, and more, so you don’t need to install files or configure your development machine to start new projects. Since your Cloud9 IDE is cloud-based, you can work on your projects from your office, home, or anywhere using an internet-connected machine. Cloud9 also provides a seamless experience for developing serverless applications enabling you to easily define resources, debug, and switch between local and remote execution of serverless applications. With Cloud9, you can quickly share your development environment with your team, enabling you to pair program and track each other's inputs in real time.
Creating EC2 Environment
EC2 Environments are defined with Ec2Environment
. To create an EC2 environment in the private subnet, specify
subnetSelection
with private subnetType
.
# create a cloud9 ec2 environment in a new VPC
vpc = ec2.Vpc(self, "VPC", max_azs=3)
cloud9.Ec2Environment(self, "Cloud9Env", vpc=vpc)
# or create the cloud9 environment in the default VPC with specific instanceType
default_vpc = ec2.Vpc.from_lookup(self, "DefaultVPC", is_default=True)
cloud9.Ec2Environment(self, "Cloud9Env2",
vpc=default_vpc,
instance_type=ec2.InstanceType("t3.large")
)
# or specify in a different subnetSelection
c9env = cloud9.Ec2Environment(self, "Cloud9Env3",
vpc=vpc,
subnet_selection=ec2.SubnetSelection(
subnet_type=ec2.SubnetType.PRIVATE_WITH_NAT
)
)
# print the Cloud9 IDE URL in the output
CfnOutput(self, "URL", value=c9env.ide_url)
Cloning Repositories
Use clonedRepositories
to clone one or multiple AWS Codecommit repositories into the environment:
import aws_cdk.aws_codecommit as codecommit
# create a new Cloud9 environment and clone the two repositories
# vpc: ec2.Vpc
# create a codecommit repository to clone into the cloud9 environment
repo_new = codecommit.Repository(self, "RepoNew",
repository_name="new-repo"
)
# import an existing codecommit repository to clone into the cloud9 environment
repo_existing = codecommit.Repository.from_repository_name(self, "RepoExisting", "existing-repo")
cloud9.Ec2Environment(self, "C9Env",
vpc=vpc,
cloned_repositories=[
cloud9.CloneRepository.from_code_commit(repo_new, "/src/new-repo"),
cloud9.CloneRepository.from_code_commit(repo_existing, "/src/existing-repo")
]
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file aws-cdk.aws-cloud9-1.187.0.tar.gz
.
File metadata
- Download URL: aws-cdk.aws-cloud9-1.187.0.tar.gz
- Upload date:
- Size: 60.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f993ded3016a3cc01f9fbbc59279cc32650e08e069d26529ddc49a7b3ba39802 |
|
MD5 | af9f5212dbf760eb2fa4bac8baaa4fb7 |
|
BLAKE2b-256 | ab6c7deabe835d37748d3fc08723b5407509ed9e71158572c550f7feca90a206 |
File details
Details for the file aws_cdk.aws_cloud9-1.187.0-py3-none-any.whl
.
File metadata
- Download URL: aws_cdk.aws_cloud9-1.187.0-py3-none-any.whl
- Upload date:
- Size: 59.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82e8592de032337e2cd59c9fd507155151c207da992417b7ef8f49a4142ed069 |
|
MD5 | 9b7048f168d2e25e7b4958935081d6e8 |
|
BLAKE2b-256 | cb562e91225c0bca06dcc9ae3b592a16df0e2d192d828c1c3fa66a633006487e |