bootstrappable-cloud9
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

Bootstrappable Cloud9 Instance with SSM

Simple stack example:

export class Cloud9EnvironmentExampleStack extends cdk.Stack {
  constructor(scope: Construct, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    // Create L2 Cloud9 Environment
    const environment = new Cloud9Environment(this, "environment", {
      name: "example-environment",
      description: "An example environment",
      imageId: Cloud9AmiType.AMZN_LINUX_2,
      connectionType: Cloud9ConnectionType.SSM,
      ownerArn: "<YOUR_ARN>",
    });

    // Existing CodeCommit Repository
    const repository = Repository.fromRepositoryName(this, "test", "test-repo");
    // Clone Git Repositories within Cloud9 Environment
    environment.cloneCodeCommitRepo(repository, "test");
    environment.cloneGitRepo(
      "https://github.com/aws-samples/aws-copilot-pubsub",
      "copilot"
    );

    environment.addInitCommands(["sudo yum update -y", "sudo yum install -y jq"]);

    //-----------------------------------------------------
    //-                  Outputs                         -
    //-----------------------------------------------------
    new cdk.CfnOutput(this, "environmentUrl", {
      value: environment.environmentUrl,
      description: "The URL of the environment",
    });
  }
}

Readme

Keywords

Package Sidebar

Install

npm i bootstrappable-cloud9

Weekly Downloads

2

Version

0.0.5

License

MIT

Unpacked Size

216 kB

Total Files

14

Last publish

Collaborators

  • rafams