Skip to content

Instantly share code, notes, and snippets.

@robertd
Created January 19, 2020 23:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robertd/5a3f99b86d96187772f853105db7b147 to your computer and use it in GitHub Desktop.
Save robertd/5a3f99b86d96187772f853105db7b147 to your computer and use it in GitHub Desktop.
@aws-cdk/assert: > cdk-build
aws-cdk: PASS test/api/bootstrap.test.ts
aws-cdk: ● Console
aws-cdk: console.error lib/logging.js:705
aws-cdk: mockStack: creating CloudFormation changeset...
aws-cdk: console.error lib/logging.js:705
aws-cdk: mockStack: creating CloudFormation changeset...
aws-cdk: console.error lib/logging.js:705
aws-cdk: mockStack: creating CloudFormation changeset...
aws-cdk: console.error lib/logging.js:705
aws-cdk: mockStack: creating CloudFormation changeset...
aws-cdk: /bin/sh: dotnet: command not found
aws-cdk: FAIL test/init.test.ts
aws-cdk: ● Console
aws-cdk: console.error lib/logging.js:705
aws-cdk: Applying project template lib for typescript
aws-cdk: console.error lib/logging.js:705
aws-cdk: Initializing a new git repository...
aws-cdk: console.error lib/logging.js:705
aws-cdk: Please run npm install!
aws-cdk: console.error lib/logging.js:705
aws-cdk: ## AWS CDK Toolkit
aws-cdk: <!--BEGIN STABILITY BANNER-->
aws-cdk:
aws-cdk: ---
aws-cdk:
aws-cdk: ![Stability: Stable](https://img.shields.io/badge/stability-Stable-success.svg?style=for-the-badge)
aws-cdk:
aws-cdk:
aws-cdk: ---
aws-cdk: <!--END STABILITY BANNER-->
aws-cdk:
aws-cdk: The AWS CDK Toolkit provides the `cdk` command-line interface that can be used to work with AWS CDK applications.
aws-cdk:
aws-cdk: Command | Description
aws-cdk: ----------------------------------|-------------------------------------------------------------------------------------
aws-cdk: [`cdk docs`](#cdk-docs) | Access the online documentation
aws-cdk: [`cdk init`](#cdk-init) | Start a new CDK project (app or library)
aws-cdk: [`cdk list`](#cdk-list) | List stacks in an application
aws-cdk: [`cdk synth`](#cdk-synthesize) | Synthesize a CDK app to CloudFormation template(s)
aws-cdk: [`cdk diff`](#cdk-diff) | Diff stacks against current state
aws-cdk: [`cdk deploy`](#cdk-deploy) | Deploy a stack into an AWS account
aws-cdk: [`cdk destroy`](#cdk-destroy) | Deletes a stack from an AWS account
aws-cdk: [`cdk bootstrap`](#cdk-bootstrap) | Deploy a toolkit stack to support deploying large stacks & artifacts
aws-cdk: [`cdk doctor`](#cdk-doctor) | Inspect the environment and produce information useful for troubleshooting
aws-cdk:
aws-cdk: This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.
aws-cdk:
aws-cdk: ### Commands
aws-cdk: #### `cdk docs`
aws-cdk: Outputs the URL to the documentation for the current toolkit version, and attempts to open a browser to that URL.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # Open the documentation in the default browser (using 'open')
aws-cdk: $ cdk docs
aws-cdk: https://docs.aws.amazon.com/cdk/api/latest/
aws-cdk:
aws-cdk: $ # Open the documentation in Chrome.
aws-cdk: $ cdk docs --browser='chrome %u'
aws-cdk: https://docs.aws.amazon.com/cdk/api/latest/
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk init`
aws-cdk: Creates a new CDK project.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # List the available template types & languages
aws-cdk: $ cdk init --list
aws-cdk: Available templates:
aws-cdk: * app: Template for a CDK Application
aws-cdk: └─ cdk init app --language=[java|typescript]
aws-cdk: * lib: Template for a CDK Construct Library
aws-cdk: └─ cdk init lib --language=typescript
aws-cdk:
aws-cdk: $ # Create a new library application in typescript
aws-cdk: $ cdk init lib --language=typescript
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk list`
aws-cdk: Lists the stacks modeled in the CDK app.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # List all stacks in the CDK app 'node bin/main.js'
aws-cdk: $ cdk list --app='node bin/main.js'
aws-cdk: Foo
aws-cdk: Bar
aws-cdk: Baz
aws-cdk:
aws-cdk: $ # List all stack including all details (add --json to output JSON instead of YAML)
aws-cdk: $ cdk list --app='node bin/main.js' --long
aws-cdk: -
aws-cdk: name: Foo
aws-cdk: environment:
aws-cdk: name: 000000000000/bermuda-triangle-1
aws-cdk: account: '000000000000'
aws-cdk: region: bermuda-triangle-1
aws-cdk: -
aws-cdk: name: Bar
aws-cdk: environment:
aws-cdk: name: 111111111111/bermuda-triangle-2
aws-cdk: account: '111111111111'
aws-cdk: region: bermuda-triangle-2
aws-cdk: -
aws-cdk: name: Baz
aws-cdk: environment:
aws-cdk: name: 333333333333/bermuda-triangle-3
aws-cdk: account: '333333333333'
aws-cdk: region: bermuda-triangle-3
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk synthesize`
aws-cdk: Synthesize the CDK app and outputs CloudFormation templates. If the application contains multiple stacks and no
aws-cdk: stack name is provided in the command-line arguments, the `--output` option is mandatory and a CloudFormation template
aws-cdk: will be generated in the output folder for each stack.
aws-cdk:
aws-cdk: By default, templates are generated in YAML format. The `--json` option can be used to switch to JSON.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # Generate the template for StackName and output it to STDOUT
aws-cdk: $ cdk synthesize --app='node bin/main.js' MyStackName
aws-cdk:
aws-cdk: $ # Generate the template for MyStackName and save it to template.yml
aws-cdk: $ cdk synth --app='node bin/main.js' MyStackName --output=template.yml
aws-cdk:
aws-cdk: $ # Generate templates for all the stacks and save them into templates/
aws-cdk: $ cdk synth --app='node bin/main.js' --output=templates
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk diff`
aws-cdk: Computes differences between the infrastructure specified in the current state of the CDK app and the currently
aws-cdk: deployed application (or a user-specified CloudFormation template). This command returns non-zero if any differences are
aws-cdk: found.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # Diff against the currently deployed stack
aws-cdk: $ cdk diff --app='node bin/main.js' MyStackName
aws-cdk:
aws-cdk: $ # Diff against a specific template document
aws-cdk: $ cdk diff --app='node bin/main.js' MyStackName --template=path/to/template.yml
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk deploy`
aws-cdk: Deploys a stack of your CDK app to it's environment. During the deployment, the toolkit will output progress
aws-cdk: indications, similar to what can be observed in the AWS CloudFormation Console. If the environment was never
aws-cdk: bootstrapped (using `cdk bootstrap`), only stacks that are not using assets and synthesize to a template that is under
aws-cdk: 51,200 bytes will successfully deploy.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ cdk deploy --app='node bin/main.js' MyStackName
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk destroy`
aws-cdk: Deletes a stack from it's environment. This will cause the resources in the stack to be destroyed (unless they were
aws-cdk: configured with a `DeletionPolicy` of `Retain`). During the stack destruction, the command will output progress
aws-cdk: information similar to what `cdk deploy` provides.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ cdk destroy --app='node bin/main.js' MyStackName
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk bootstrap`
aws-cdk: Deploys a `CDKToolkit` CloudFormation stack into the specified environment(s), that provides an S3 bucket that
aws-cdk: `cdk deploy` will use to store synthesized templates and the related assets, before triggering a CloudFormation stack
aws-cdk: update. The name of the deployed stack can be configured using the `--toolkit-stack-name` argument.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # Deploys to all environments
aws-cdk: $ cdk bootstrap --app='node bin/main.js'
aws-cdk:
aws-cdk: $ # Deploys only to environments foo and bar
aws-cdk: $ cdk bootstrap --app='node bin/main.js' foo bar
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk doctor`
aws-cdk: Inspect the current command-line environment and configurations, and collect information that can be useful for
aws-cdk: troubleshooting problems. It is usually a good idea to include the information provided by this command when submitting
aws-cdk: a bug report.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ cdk doctor
aws-cdk: ℹ️ CDK Version: 1.0.0 (build e64993a)
aws-cdk: ℹ️ AWS environment variables:
aws-cdk: - AWS_EC2_METADATA_DISABLED = 1
aws-cdk: - AWS_SDK_LOAD_CONFIG = 1
aws-cdk: ```
aws-cdk:
aws-cdk: ### Configuration
aws-cdk: On top of passing configuration through command-line arguments, it is possible to use JSON configuration files. The
aws-cdk: configuration's order of precedence is:
aws-cdk: 1. Command-line arguments
aws-cdk: 2. Project configuration (`./cdk.json`)
aws-cdk: 3. User configuration (`~/.cdk.json`)
aws-cdk:
aws-cdk: #### JSON Configuration files
aws-cdk: Some of the interesting keys that can be used in the JSON configuration files:
aws-cdk: ```js
aws-cdk: {
aws-cdk: "app": "node bin/main.js", // Command to start the CDK app (--app='node bin/main.js')
aws-cdk: "context": { // Context entries (--context=key=value)
aws-cdk: "key": "value",
aws-cdk: },
aws-cdk: "toolkitStackName": "foo", // Customize 'bootstrap' stack name (--toolkit-stack-name=foo)
aws-cdk: "toolkitBucketName": "fooBucket", // Customize 'bootstrap' bucket name(--toolkit-bucket-name=fooBucket)
aws-cdk: "versionReporting": false, // Opt-out of version reporting (--no-version-reporting)
aws-cdk: }
aws-cdk: ```
aws-cdk:
aws-cdk: console.error lib/logging.js:705
aws-cdk: Applying project template app for typescript
aws-cdk: console.error lib/logging.js:705
aws-cdk: Initializing a new git repository...
aws-cdk: console.error lib/logging.js:705
aws-cdk: Please run npm install!
aws-cdk: console.error lib/logging.js:705
aws-cdk: ## AWS CDK Toolkit
aws-cdk: <!--BEGIN STABILITY BANNER-->
aws-cdk:
aws-cdk: ---
aws-cdk:
aws-cdk: ![Stability: Stable](https://img.shields.io/badge/stability-Stable-success.svg?style=for-the-badge)
aws-cdk:
aws-cdk:
aws-cdk: ---
aws-cdk: <!--END STABILITY BANNER-->
aws-cdk:
aws-cdk: The AWS CDK Toolkit provides the `cdk` command-line interface that can be used to work with AWS CDK applications.
aws-cdk:
aws-cdk: Command | Description
aws-cdk: ----------------------------------|-------------------------------------------------------------------------------------
aws-cdk: [`cdk docs`](#cdk-docs) | Access the online documentation
aws-cdk: [`cdk init`](#cdk-init) | Start a new CDK project (app or library)
aws-cdk: [`cdk list`](#cdk-list) | List stacks in an application
aws-cdk: [`cdk synth`](#cdk-synthesize) | Synthesize a CDK app to CloudFormation template(s)
aws-cdk: [`cdk diff`](#cdk-diff) | Diff stacks against current state
aws-cdk: [`cdk deploy`](#cdk-deploy) | Deploy a stack into an AWS account
aws-cdk: [`cdk destroy`](#cdk-destroy) | Deletes a stack from an AWS account
aws-cdk: [`cdk bootstrap`](#cdk-bootstrap) | Deploy a toolkit stack to support deploying large stacks & artifacts
aws-cdk: [`cdk doctor`](#cdk-doctor) | Inspect the environment and produce information useful for troubleshooting
aws-cdk:
aws-cdk: This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.
aws-cdk:
aws-cdk: ### Commands
aws-cdk: #### `cdk docs`
aws-cdk: Outputs the URL to the documentation for the current toolkit version, and attempts to open a browser to that URL.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # Open the documentation in the default browser (using 'open')
aws-cdk: $ cdk docs
aws-cdk: https://docs.aws.amazon.com/cdk/api/latest/
aws-cdk:
aws-cdk: $ # Open the documentation in Chrome.
aws-cdk: $ cdk docs --browser='chrome %u'
aws-cdk: https://docs.aws.amazon.com/cdk/api/latest/
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk init`
aws-cdk: Creates a new CDK project.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # List the available template types & languages
aws-cdk: $ cdk init --list
aws-cdk: Available templates:
aws-cdk: * app: Template for a CDK Application
aws-cdk: └─ cdk init app --language=[java|typescript]
aws-cdk: * lib: Template for a CDK Construct Library
aws-cdk: └─ cdk init lib --language=typescript
aws-cdk:
aws-cdk: $ # Create a new library application in typescript
aws-cdk: $ cdk init lib --language=typescript
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk list`
aws-cdk: Lists the stacks modeled in the CDK app.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # List all stacks in the CDK app 'node bin/main.js'
aws-cdk: $ cdk list --app='node bin/main.js'
aws-cdk: Foo
aws-cdk: Bar
aws-cdk: Baz
aws-cdk:
aws-cdk: $ # List all stack including all details (add --json to output JSON instead of YAML)
aws-cdk: $ cdk list --app='node bin/main.js' --long
aws-cdk: -
aws-cdk: name: Foo
aws-cdk: environment:
aws-cdk: name: 000000000000/bermuda-triangle-1
aws-cdk: account: '000000000000'
aws-cdk: region: bermuda-triangle-1
aws-cdk: -
aws-cdk: name: Bar
aws-cdk: environment:
aws-cdk: name: 111111111111/bermuda-triangle-2
aws-cdk: account: '111111111111'
aws-cdk: region: bermuda-triangle-2
aws-cdk: -
aws-cdk: name: Baz
aws-cdk: environment:
aws-cdk: name: 333333333333/bermuda-triangle-3
aws-cdk: account: '333333333333'
aws-cdk: region: bermuda-triangle-3
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk synthesize`
aws-cdk: Synthesize the CDK app and outputs CloudFormation templates. If the application contains multiple stacks and no
aws-cdk: stack name is provided in the command-line arguments, the `--output` option is mandatory and a CloudFormation template
aws-cdk: will be generated in the output folder for each stack.
aws-cdk:
aws-cdk: By default, templates are generated in YAML format. The `--json` option can be used to switch to JSON.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # Generate the template for StackName and output it to STDOUT
aws-cdk: $ cdk synthesize --app='node bin/main.js' MyStackName
aws-cdk:
aws-cdk: $ # Generate the template for MyStackName and save it to template.yml
aws-cdk: $ cdk synth --app='node bin/main.js' MyStackName --output=template.yml
aws-cdk:
aws-cdk: $ # Generate templates for all the stacks and save them into templates/
aws-cdk: $ cdk synth --app='node bin/main.js' --output=templates
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk diff`
aws-cdk: Computes differences between the infrastructure specified in the current state of the CDK app and the currently
aws-cdk: deployed application (or a user-specified CloudFormation template). This command returns non-zero if any differences are
aws-cdk: found.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # Diff against the currently deployed stack
aws-cdk: $ cdk diff --app='node bin/main.js' MyStackName
aws-cdk:
aws-cdk: $ # Diff against a specific template document
aws-cdk: $ cdk diff --app='node bin/main.js' MyStackName --template=path/to/template.yml
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk deploy`
aws-cdk: Deploys a stack of your CDK app to it's environment. During the deployment, the toolkit will output progress
aws-cdk: indications, similar to what can be observed in the AWS CloudFormation Console. If the environment was never
aws-cdk: bootstrapped (using `cdk bootstrap`), only stacks that are not using assets and synthesize to a template that is under
aws-cdk: 51,200 bytes will successfully deploy.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ cdk deploy --app='node bin/main.js' MyStackName
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk destroy`
aws-cdk: Deletes a stack from it's environment. This will cause the resources in the stack to be destroyed (unless they were
aws-cdk: configured with a `DeletionPolicy` of `Retain`). During the stack destruction, the command will output progress
aws-cdk: information similar to what `cdk deploy` provides.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ cdk destroy --app='node bin/main.js' MyStackName
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk bootstrap`
aws-cdk: Deploys a `CDKToolkit` CloudFormation stack into the specified environment(s), that provides an S3 bucket that
aws-cdk: `cdk deploy` will use to store synthesized templates and the related assets, before triggering a CloudFormation stack
aws-cdk: update. The name of the deployed stack can be configured using the `--toolkit-stack-name` argument.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # Deploys to all environments
aws-cdk: $ cdk bootstrap --app='node bin/main.js'
aws-cdk:
aws-cdk: $ # Deploys only to environments foo and bar
aws-cdk: $ cdk bootstrap --app='node bin/main.js' foo bar
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk doctor`
aws-cdk: Inspect the current command-line environment and configurations, and collect information that can be useful for
aws-cdk: troubleshooting problems. It is usually a good idea to include the information provided by this command when submitting
aws-cdk: a bug report.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ cdk doctor
aws-cdk: ℹ️ CDK Version: 1.0.0 (build e64993a)
aws-cdk: ℹ️ AWS environment variables:
aws-cdk: - AWS_EC2_METADATA_DISABLED = 1
aws-cdk: - AWS_SDK_LOAD_CONFIG = 1
aws-cdk: ```
aws-cdk:
aws-cdk: ### Configuration
aws-cdk: On top of passing configuration through command-line arguments, it is possible to use JSON configuration files. The
aws-cdk: configuration's order of precedence is:
aws-cdk: 1. Command-line arguments
aws-cdk: 2. Project configuration (`./cdk.json`)
aws-cdk: 3. User configuration (`~/.cdk.json`)
aws-cdk:
aws-cdk: #### JSON Configuration files
aws-cdk: Some of the interesting keys that can be used in the JSON configuration files:
aws-cdk: ```js
aws-cdk: {
aws-cdk: "app": "node bin/main.js", // Command to start the CDK app (--app='node bin/main.js')
aws-cdk: "context": { // Context entries (--context=key=value)
aws-cdk: "key": "value",
aws-cdk: },
aws-cdk: "toolkitStackName": "foo", // Customize 'bootstrap' stack name (--toolkit-stack-name=foo)
aws-cdk: "toolkitBucketName": "fooBucket", // Customize 'bootstrap' bucket name(--toolkit-bucket-name=fooBucket)
aws-cdk: "versionReporting": false, // Opt-out of version reporting (--no-version-reporting)
aws-cdk: }
aws-cdk: ```
aws-cdk:
aws-cdk: console.error lib/logging.js:705
aws-cdk: Applying project template app for javascript
aws-cdk: console.error lib/logging.js:705
aws-cdk: Initializing a new git repository...
aws-cdk: console.error lib/logging.js:705
aws-cdk: Please run npm install!
aws-cdk: console.error lib/logging.js:705
aws-cdk: ## AWS CDK Toolkit
aws-cdk: <!--BEGIN STABILITY BANNER-->
aws-cdk:
aws-cdk: ---
aws-cdk:
aws-cdk: ![Stability: Stable](https://img.shields.io/badge/stability-Stable-success.svg?style=for-the-badge)
aws-cdk:
aws-cdk:
aws-cdk: ---
aws-cdk: <!--END STABILITY BANNER-->
aws-cdk:
aws-cdk: The AWS CDK Toolkit provides the `cdk` command-line interface that can be used to work with AWS CDK applications.
aws-cdk:
aws-cdk: Command | Description
aws-cdk: ----------------------------------|-------------------------------------------------------------------------------------
aws-cdk: [`cdk docs`](#cdk-docs) | Access the online documentation
aws-cdk: [`cdk init`](#cdk-init) | Start a new CDK project (app or library)
aws-cdk: [`cdk list`](#cdk-list) | List stacks in an application
aws-cdk: [`cdk synth`](#cdk-synthesize) | Synthesize a CDK app to CloudFormation template(s)
aws-cdk: [`cdk diff`](#cdk-diff) | Diff stacks against current state
aws-cdk: [`cdk deploy`](#cdk-deploy) | Deploy a stack into an AWS account
aws-cdk: [`cdk destroy`](#cdk-destroy) | Deletes a stack from an AWS account
aws-cdk: [`cdk bootstrap`](#cdk-bootstrap) | Deploy a toolkit stack to support deploying large stacks & artifacts
aws-cdk: [`cdk doctor`](#cdk-doctor) | Inspect the environment and produce information useful for troubleshooting
aws-cdk:
aws-cdk: This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.
aws-cdk:
aws-cdk: ### Commands
aws-cdk: #### `cdk docs`
aws-cdk: Outputs the URL to the documentation for the current toolkit version, and attempts to open a browser to that URL.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # Open the documentation in the default browser (using 'open')
aws-cdk: $ cdk docs
aws-cdk: https://docs.aws.amazon.com/cdk/api/latest/
aws-cdk:
aws-cdk: $ # Open the documentation in Chrome.
aws-cdk: $ cdk docs --browser='chrome %u'
aws-cdk: https://docs.aws.amazon.com/cdk/api/latest/
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk init`
aws-cdk: Creates a new CDK project.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # List the available template types & languages
aws-cdk: $ cdk init --list
aws-cdk: Available templates:
aws-cdk: * app: Template for a CDK Application
aws-cdk: └─ cdk init app --language=[java|typescript]
aws-cdk: * lib: Template for a CDK Construct Library
aws-cdk: └─ cdk init lib --language=typescript
aws-cdk:
aws-cdk: $ # Create a new library application in typescript
aws-cdk: $ cdk init lib --language=typescript
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk list`
aws-cdk: Lists the stacks modeled in the CDK app.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # List all stacks in the CDK app 'node bin/main.js'
aws-cdk: $ cdk list --app='node bin/main.js'
aws-cdk: Foo
aws-cdk: Bar
aws-cdk: Baz
aws-cdk:
aws-cdk: $ # List all stack including all details (add --json to output JSON instead of YAML)
aws-cdk: $ cdk list --app='node bin/main.js' --long
aws-cdk: -
aws-cdk: name: Foo
aws-cdk: environment:
aws-cdk: name: 000000000000/bermuda-triangle-1
aws-cdk: account: '000000000000'
aws-cdk: region: bermuda-triangle-1
aws-cdk: -
aws-cdk: name: Bar
aws-cdk: environment:
aws-cdk: name: 111111111111/bermuda-triangle-2
aws-cdk: account: '111111111111'
aws-cdk: region: bermuda-triangle-2
aws-cdk: -
aws-cdk: name: Baz
aws-cdk: environment:
aws-cdk: name: 333333333333/bermuda-triangle-3
aws-cdk: account: '333333333333'
aws-cdk: region: bermuda-triangle-3
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk synthesize`
aws-cdk: Synthesize the CDK app and outputs CloudFormation templates. If the application contains multiple stacks and no
aws-cdk: stack name is provided in the command-line arguments, the `--output` option is mandatory and a CloudFormation template
aws-cdk: will be generated in the output folder for each stack.
aws-cdk:
aws-cdk: By default, templates are generated in YAML format. The `--json` option can be used to switch to JSON.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # Generate the template for StackName and output it to STDOUT
aws-cdk: $ cdk synthesize --app='node bin/main.js' MyStackName
aws-cdk:
aws-cdk: $ # Generate the template for MyStackName and save it to template.yml
aws-cdk: $ cdk synth --app='node bin/main.js' MyStackName --output=template.yml
aws-cdk:
aws-cdk: $ # Generate templates for all the stacks and save them into templates/
aws-cdk: $ cdk synth --app='node bin/main.js' --output=templates
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk diff`
aws-cdk: Computes differences between the infrastructure specified in the current state of the CDK app and the currently
aws-cdk: deployed application (or a user-specified CloudFormation template). This command returns non-zero if any differences are
aws-cdk: found.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # Diff against the currently deployed stack
aws-cdk: $ cdk diff --app='node bin/main.js' MyStackName
aws-cdk:
aws-cdk: $ # Diff against a specific template document
aws-cdk: $ cdk diff --app='node bin/main.js' MyStackName --template=path/to/template.yml
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk deploy`
aws-cdk: Deploys a stack of your CDK app to it's environment. During the deployment, the toolkit will output progress
aws-cdk: indications, similar to what can be observed in the AWS CloudFormation Console. If the environment was never
aws-cdk: bootstrapped (using `cdk bootstrap`), only stacks that are not using assets and synthesize to a template that is under
aws-cdk: 51,200 bytes will successfully deploy.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ cdk deploy --app='node bin/main.js' MyStackName
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk destroy`
aws-cdk: Deletes a stack from it's environment. This will cause the resources in the stack to be destroyed (unless they were
aws-cdk: configured with a `DeletionPolicy` of `Retain`). During the stack destruction, the command will output progress
aws-cdk: information similar to what `cdk deploy` provides.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ cdk destroy --app='node bin/main.js' MyStackName
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk bootstrap`
aws-cdk: Deploys a `CDKToolkit` CloudFormation stack into the specified environment(s), that provides an S3 bucket that
aws-cdk: `cdk deploy` will use to store synthesized templates and the related assets, before triggering a CloudFormation stack
aws-cdk: update. The name of the deployed stack can be configured using the `--toolkit-stack-name` argument.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # Deploys to all environments
aws-cdk: $ cdk bootstrap --app='node bin/main.js'
aws-cdk:
aws-cdk: $ # Deploys only to environments foo and bar
aws-cdk: $ cdk bootstrap --app='node bin/main.js' foo bar
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk doctor`
aws-cdk: Inspect the current command-line environment and configurations, and collect information that can be useful for
aws-cdk: troubleshooting problems. It is usually a good idea to include the information provided by this command when submitting
aws-cdk: a bug report.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ cdk doctor
aws-cdk: ℹ️ CDK Version: 1.0.0 (build e64993a)
aws-cdk: ℹ️ AWS environment variables:
aws-cdk: - AWS_EC2_METADATA_DISABLED = 1
aws-cdk: - AWS_SDK_LOAD_CONFIG = 1
aws-cdk: ```
aws-cdk:
aws-cdk: ### Configuration
aws-cdk: On top of passing configuration through command-line arguments, it is possible to use JSON configuration files. The
aws-cdk: configuration's order of precedence is:
aws-cdk: 1. Command-line arguments
aws-cdk: 2. Project configuration (`./cdk.json`)
aws-cdk: 3. User configuration (`~/.cdk.json`)
aws-cdk:
aws-cdk: #### JSON Configuration files
aws-cdk: Some of the interesting keys that can be used in the JSON configuration files:
aws-cdk: ```js
aws-cdk: {
aws-cdk: "app": "node bin/main.js", // Command to start the CDK app (--app='node bin/main.js')
aws-cdk: "context": { // Context entries (--context=key=value)
aws-cdk: "key": "value",
aws-cdk: },
aws-cdk: "toolkitStackName": "foo", // Customize 'bootstrap' stack name (--toolkit-stack-name=foo)
aws-cdk: "toolkitBucketName": "fooBucket", // Customize 'bootstrap' bucket name(--toolkit-bucket-name=fooBucket)
aws-cdk: "versionReporting": false, // Opt-out of version reporting (--no-version-reporting)
aws-cdk: }
aws-cdk: ```
aws-cdk:
aws-cdk: console.error lib/logging.js:705
aws-cdk: Applying project template app for javascript
aws-cdk: console.error lib/logging.js:705
aws-cdk: ## AWS CDK Toolkit
aws-cdk: <!--BEGIN STABILITY BANNER-->
aws-cdk:
aws-cdk: ---
aws-cdk:
aws-cdk: ![Stability: Stable](https://img.shields.io/badge/stability-Stable-success.svg?style=for-the-badge)
aws-cdk:
aws-cdk:
aws-cdk: ---
aws-cdk: <!--END STABILITY BANNER-->
aws-cdk:
aws-cdk: The AWS CDK Toolkit provides the `cdk` command-line interface that can be used to work with AWS CDK applications.
aws-cdk:
aws-cdk: Command | Description
aws-cdk: ----------------------------------|-------------------------------------------------------------------------------------
aws-cdk: [`cdk docs`](#cdk-docs) | Access the online documentation
aws-cdk: [`cdk init`](#cdk-init) | Start a new CDK project (app or library)
aws-cdk: [`cdk list`](#cdk-list) | List stacks in an application
aws-cdk: [`cdk synth`](#cdk-synthesize) | Synthesize a CDK app to CloudFormation template(s)
aws-cdk: [`cdk diff`](#cdk-diff) | Diff stacks against current state
aws-cdk: [`cdk deploy`](#cdk-deploy) | Deploy a stack into an AWS account
aws-cdk: [`cdk destroy`](#cdk-destroy) | Deletes a stack from an AWS account
aws-cdk: [`cdk bootstrap`](#cdk-bootstrap) | Deploy a toolkit stack to support deploying large stacks & artifacts
aws-cdk: [`cdk doctor`](#cdk-doctor) | Inspect the environment and produce information useful for troubleshooting
aws-cdk:
aws-cdk: This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.
aws-cdk:
aws-cdk: ### Commands
aws-cdk: #### `cdk docs`
aws-cdk: Outputs the URL to the documentation for the current toolkit version, and attempts to open a browser to that URL.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # Open the documentation in the default browser (using 'open')
aws-cdk: $ cdk docs
aws-cdk: https://docs.aws.amazon.com/cdk/api/latest/
aws-cdk:
aws-cdk: $ # Open the documentation in Chrome.
aws-cdk: $ cdk docs --browser='chrome %u'
aws-cdk: https://docs.aws.amazon.com/cdk/api/latest/
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk init`
aws-cdk: Creates a new CDK project.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # List the available template types & languages
aws-cdk: $ cdk init --list
aws-cdk: Available templates:
aws-cdk: * app: Template for a CDK Application
aws-cdk: └─ cdk init app --language=[java|typescript]
aws-cdk: * lib: Template for a CDK Construct Library
aws-cdk: └─ cdk init lib --language=typescript
aws-cdk:
aws-cdk: $ # Create a new library application in typescript
aws-cdk: $ cdk init lib --language=typescript
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk list`
aws-cdk: Lists the stacks modeled in the CDK app.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # List all stacks in the CDK app 'node bin/main.js'
aws-cdk: $ cdk list --app='node bin/main.js'
aws-cdk: Foo
aws-cdk: Bar
aws-cdk: Baz
aws-cdk:
aws-cdk: $ # List all stack including all details (add --json to output JSON instead of YAML)
aws-cdk: $ cdk list --app='node bin/main.js' --long
aws-cdk: -
aws-cdk: name: Foo
aws-cdk: environment:
aws-cdk: name: 000000000000/bermuda-triangle-1
aws-cdk: account: '000000000000'
aws-cdk: region: bermuda-triangle-1
aws-cdk: -
aws-cdk: name: Bar
aws-cdk: environment:
aws-cdk: name: 111111111111/bermuda-triangle-2
aws-cdk: account: '111111111111'
aws-cdk: region: bermuda-triangle-2
aws-cdk: -
aws-cdk: name: Baz
aws-cdk: environment:
aws-cdk: name: 333333333333/bermuda-triangle-3
aws-cdk: account: '333333333333'
aws-cdk: region: bermuda-triangle-3
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk synthesize`
aws-cdk: Synthesize the CDK app and outputs CloudFormation templates. If the application contains multiple stacks and no
aws-cdk: stack name is provided in the command-line arguments, the `--output` option is mandatory and a CloudFormation template
aws-cdk: will be generated in the output folder for each stack.
aws-cdk:
aws-cdk: By default, templates are generated in YAML format. The `--json` option can be used to switch to JSON.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # Generate the template for StackName and output it to STDOUT
aws-cdk: $ cdk synthesize --app='node bin/main.js' MyStackName
aws-cdk:
aws-cdk: $ # Generate the template for MyStackName and save it to template.yml
aws-cdk: $ cdk synth --app='node bin/main.js' MyStackName --output=template.yml
aws-cdk:
aws-cdk: $ # Generate templates for all the stacks and save them into templates/
aws-cdk: $ cdk synth --app='node bin/main.js' --output=templates
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk diff`
aws-cdk: Computes differences between the infrastructure specified in the current state of the CDK app and the currently
aws-cdk: deployed application (or a user-specified CloudFormation template). This command returns non-zero if any differences are
aws-cdk: found.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # Diff against the currently deployed stack
aws-cdk: $ cdk diff --app='node bin/main.js' MyStackName
aws-cdk:
aws-cdk: $ # Diff against a specific template document
aws-cdk: $ cdk diff --app='node bin/main.js' MyStackName --template=path/to/template.yml
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk deploy`
aws-cdk: Deploys a stack of your CDK app to it's environment. During the deployment, the toolkit will output progress
aws-cdk: indications, similar to what can be observed in the AWS CloudFormation Console. If the environment was never
aws-cdk: bootstrapped (using `cdk bootstrap`), only stacks that are not using assets and synthesize to a template that is under
aws-cdk: 51,200 bytes will successfully deploy.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ cdk deploy --app='node bin/main.js' MyStackName
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk destroy`
aws-cdk: Deletes a stack from it's environment. This will cause the resources in the stack to be destroyed (unless they were
aws-cdk: configured with a `DeletionPolicy` of `Retain`). During the stack destruction, the command will output progress
aws-cdk: information similar to what `cdk deploy` provides.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ cdk destroy --app='node bin/main.js' MyStackName
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk bootstrap`
aws-cdk: Deploys a `CDKToolkit` CloudFormation stack into the specified environment(s), that provides an S3 bucket that
aws-cdk: `cdk deploy` will use to store synthesized templates and the related assets, before triggering a CloudFormation stack
aws-cdk: update. The name of the deployed stack can be configured using the `--toolkit-stack-name` argument.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # Deploys to all environments
aws-cdk: $ cdk bootstrap --app='node bin/main.js'
aws-cdk:
aws-cdk: $ # Deploys only to environments foo and bar
aws-cdk: $ cdk bootstrap --app='node bin/main.js' foo bar
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk doctor`
aws-cdk: Inspect the current command-line environment and configurations, and collect information that can be useful for
aws-cdk: troubleshooting problems. It is usually a good idea to include the information provided by this command when submitting
aws-cdk: a bug report.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ cdk doctor
aws-cdk: ℹ️ CDK Version: 1.0.0 (build e64993a)
aws-cdk: ℹ️ AWS environment variables:
aws-cdk: - AWS_EC2_METADATA_DISABLED = 1
aws-cdk: - AWS_SDK_LOAD_CONFIG = 1
aws-cdk: ```
aws-cdk:
aws-cdk: ### Configuration
aws-cdk: On top of passing configuration through command-line arguments, it is possible to use JSON configuration files. The
aws-cdk: configuration's order of precedence is:
aws-cdk: 1. Command-line arguments
aws-cdk: 2. Project configuration (`./cdk.json`)
aws-cdk: 3. User configuration (`~/.cdk.json`)
aws-cdk:
aws-cdk: #### JSON Configuration files
aws-cdk: Some of the interesting keys that can be used in the JSON configuration files:
aws-cdk: ```js
aws-cdk: {
aws-cdk: "app": "node bin/main.js", // Command to start the CDK app (--app='node bin/main.js')
aws-cdk: "context": { // Context entries (--context=key=value)
aws-cdk: "key": "value",
aws-cdk: },
aws-cdk: "toolkitStackName": "foo", // Customize 'bootstrap' stack name (--toolkit-stack-name=foo)
aws-cdk: "toolkitBucketName": "fooBucket", // Customize 'bootstrap' bucket name(--toolkit-bucket-name=fooBucket)
aws-cdk: "versionReporting": false, // Opt-out of version reporting (--no-version-reporting)
aws-cdk: }
aws-cdk: ```
aws-cdk:
aws-cdk: console.error lib/logging.js:705
aws-cdk: Applying project template app for typescript
aws-cdk: console.error lib/logging.js:705
aws-cdk: Please run npm install!
aws-cdk: console.error lib/logging.js:705
aws-cdk: ## AWS CDK Toolkit
aws-cdk: <!--BEGIN STABILITY BANNER-->
aws-cdk:
aws-cdk: ---
aws-cdk:
aws-cdk: ![Stability: Stable](https://img.shields.io/badge/stability-Stable-success.svg?style=for-the-badge)
aws-cdk:
aws-cdk:
aws-cdk: ---
aws-cdk: <!--END STABILITY BANNER-->
aws-cdk:
aws-cdk: The AWS CDK Toolkit provides the `cdk` command-line interface that can be used to work with AWS CDK applications.
aws-cdk:
aws-cdk: Command | Description
aws-cdk: ----------------------------------|-------------------------------------------------------------------------------------
aws-cdk: [`cdk docs`](#cdk-docs) | Access the online documentation
aws-cdk: [`cdk init`](#cdk-init) | Start a new CDK project (app or library)
aws-cdk: [`cdk list`](#cdk-list) | List stacks in an application
aws-cdk: [`cdk synth`](#cdk-synthesize) | Synthesize a CDK app to CloudFormation template(s)
aws-cdk: [`cdk diff`](#cdk-diff) | Diff stacks against current state
aws-cdk: [`cdk deploy`](#cdk-deploy) | Deploy a stack into an AWS account
aws-cdk: [`cdk destroy`](#cdk-destroy) | Deletes a stack from an AWS account
aws-cdk: [`cdk bootstrap`](#cdk-bootstrap) | Deploy a toolkit stack to support deploying large stacks & artifacts
aws-cdk: [`cdk doctor`](#cdk-doctor) | Inspect the environment and produce information useful for troubleshooting
aws-cdk:
aws-cdk: This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.
aws-cdk:
aws-cdk: ### Commands
aws-cdk: #### `cdk docs`
aws-cdk: Outputs the URL to the documentation for the current toolkit version, and attempts to open a browser to that URL.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # Open the documentation in the default browser (using 'open')
aws-cdk: $ cdk docs
aws-cdk: https://docs.aws.amazon.com/cdk/api/latest/
aws-cdk:
aws-cdk: $ # Open the documentation in Chrome.
aws-cdk: $ cdk docs --browser='chrome %u'
aws-cdk: https://docs.aws.amazon.com/cdk/api/latest/
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk init`
aws-cdk: Creates a new CDK project.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # List the available template types & languages
aws-cdk: $ cdk init --list
aws-cdk: Available templates:
aws-cdk: * app: Template for a CDK Application
aws-cdk: └─ cdk init app --language=[java|typescript]
aws-cdk: * lib: Template for a CDK Construct Library
aws-cdk: └─ cdk init lib --language=typescript
aws-cdk:
aws-cdk: $ # Create a new library application in typescript
aws-cdk: $ cdk init lib --language=typescript
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk list`
aws-cdk: Lists the stacks modeled in the CDK app.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # List all stacks in the CDK app 'node bin/main.js'
aws-cdk: $ cdk list --app='node bin/main.js'
aws-cdk: Foo
aws-cdk: Bar
aws-cdk: Baz
aws-cdk:
aws-cdk: $ # List all stack including all details (add --json to output JSON instead of YAML)
aws-cdk: $ cdk list --app='node bin/main.js' --long
aws-cdk: -
aws-cdk: name: Foo
aws-cdk: environment:
aws-cdk: name: 000000000000/bermuda-triangle-1
aws-cdk: account: '000000000000'
aws-cdk: region: bermuda-triangle-1
aws-cdk: -
aws-cdk: name: Bar
aws-cdk: environment:
aws-cdk: name: 111111111111/bermuda-triangle-2
aws-cdk: account: '111111111111'
aws-cdk: region: bermuda-triangle-2
aws-cdk: -
aws-cdk: name: Baz
aws-cdk: environment:
aws-cdk: name: 333333333333/bermuda-triangle-3
aws-cdk: account: '333333333333'
aws-cdk: region: bermuda-triangle-3
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk synthesize`
aws-cdk: Synthesize the CDK app and outputs CloudFormation templates. If the application contains multiple stacks and no
aws-cdk: stack name is provided in the command-line arguments, the `--output` option is mandatory and a CloudFormation template
aws-cdk: will be generated in the output folder for each stack.
aws-cdk:
aws-cdk: By default, templates are generated in YAML format. The `--json` option can be used to switch to JSON.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # Generate the template for StackName and output it to STDOUT
aws-cdk: $ cdk synthesize --app='node bin/main.js' MyStackName
aws-cdk:
aws-cdk: $ # Generate the template for MyStackName and save it to template.yml
aws-cdk: $ cdk synth --app='node bin/main.js' MyStackName --output=template.yml
aws-cdk:
aws-cdk: $ # Generate templates for all the stacks and save them into templates/
aws-cdk: $ cdk synth --app='node bin/main.js' --output=templates
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk diff`
aws-cdk: Computes differences between the infrastructure specified in the current state of the CDK app and the currently
aws-cdk: deployed application (or a user-specified CloudFormation template). This command returns non-zero if any differences are
aws-cdk: found.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # Diff against the currently deployed stack
aws-cdk: $ cdk diff --app='node bin/main.js' MyStackName
aws-cdk:
aws-cdk: $ # Diff against a specific template document
aws-cdk: $ cdk diff --app='node bin/main.js' MyStackName --template=path/to/template.yml
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk deploy`
aws-cdk: Deploys a stack of your CDK app to it's environment. During the deployment, the toolkit will output progress
aws-cdk: indications, similar to what can be observed in the AWS CloudFormation Console. If the environment was never
aws-cdk: bootstrapped (using `cdk bootstrap`), only stacks that are not using assets and synthesize to a template that is under
aws-cdk: 51,200 bytes will successfully deploy.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ cdk deploy --app='node bin/main.js' MyStackName
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk destroy`
aws-cdk: Deletes a stack from it's environment. This will cause the resources in the stack to be destroyed (unless they were
aws-cdk: configured with a `DeletionPolicy` of `Retain`). During the stack destruction, the command will output progress
aws-cdk: information similar to what `cdk deploy` provides.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ cdk destroy --app='node bin/main.js' MyStackName
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk bootstrap`
aws-cdk: Deploys a `CDKToolkit` CloudFormation stack into the specified environment(s), that provides an S3 bucket that
aws-cdk: `cdk deploy` will use to store synthesized templates and the related assets, before triggering a CloudFormation stack
aws-cdk: update. The name of the deployed stack can be configured using the `--toolkit-stack-name` argument.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ # Deploys to all environments
aws-cdk: $ cdk bootstrap --app='node bin/main.js'
aws-cdk:
aws-cdk: $ # Deploys only to environments foo and bar
aws-cdk: $ cdk bootstrap --app='node bin/main.js' foo bar
aws-cdk: ```
aws-cdk:
aws-cdk: #### `cdk doctor`
aws-cdk: Inspect the current command-line environment and configurations, and collect information that can be useful for
aws-cdk: troubleshooting problems. It is usually a good idea to include the information provided by this command when submitting
aws-cdk: a bug report.
aws-cdk:
aws-cdk: ```console
aws-cdk: $ cdk doctor
aws-cdk: ℹ️ CDK Version: 1.0.0 (build e64993a)
aws-cdk: ℹ️ AWS environment variables:
aws-cdk: - AWS_EC2_METADATA_DISABLED = 1
aws-cdk: - AWS_SDK_LOAD_CONFIG = 1
aws-cdk: ```
aws-cdk:
aws-cdk: ### Configuration
aws-cdk: On top of passing configuration through command-line arguments, it is possible to use JSON configuration files. The
aws-cdk: configuration's order of precedence is:
aws-cdk: 1. Command-line arguments
aws-cdk: 2. Project configuration (`./cdk.json`)
aws-cdk: 3. User configuration (`~/.cdk.json`)
aws-cdk:
aws-cdk: #### JSON Configuration files
aws-cdk: Some of the interesting keys that can be used in the JSON configuration files:
aws-cdk: ```js
aws-cdk: {
aws-cdk: "app": "node bin/main.js", // Command to start the CDK app (--app='node bin/main.js')
aws-cdk: "context": { // Context entries (--context=key=value)
aws-cdk: "key": "value",
aws-cdk: },
aws-cdk: "toolkitStackName": "foo", // Customize 'bootstrap' stack name (--toolkit-stack-name=foo)
aws-cdk: "toolkitBucketName": "fooBucket", // Customize 'bootstrap' bucket name(--toolkit-bucket-name=fooBucket)
aws-cdk: "versionReporting": false, // Opt-out of version reporting (--no-version-reporting)
aws-cdk: }
aws-cdk: ```
aws-cdk:
aws-cdk: console.error lib/logging.js:705
aws-cdk: Applying project template app for csharp
aws-cdk: ● verify "future flags" are added to cdk.json
aws-cdk: Could not add project AwsCdkTestarAakc.csproj to solution AwsCdkTestarAakc.sln. Error code: 127
aws-cdk: at ChildProcess.<anonymous> (../../../../../../../private/var/folders/qy/4g09xft92tl4920lgkhc111c00265b/T/aws-cdk-testarAAKC/tmp/add-project.hook.js:30:16)
aws-cdk: PASS test/context-providers/asymmetric-vpcs.test.ts
aws-cdk: PASS test/api/stacks.test.ts
aws-cdk: ● Console
aws-cdk: console.error lib/logging.js:640
aws-cdk: [Error at /resource] this is an error
aws-cdk: PASS test/docker.test.ts
aws-cdk: PASS test/context-providers/vpcs.test.ts
aws-cdk: PASS test/cdk-toolkit.test.ts
aws-cdk: ● Console
aws-cdk: console.error lib/logging.js:672
aws-cdk: undefined
aws-cdk: console.error lib/logging.js:705
aws-cdk: undefined: deploying...
aws-cdk: console.error lib/logging.js:683
aws-cdk:
aws-cdk: ✅ undefined
aws-cdk: console.error lib/logging.js:705
aws-cdk:
aws-cdk: Outputs:
aws-cdk: console.error lib/logging.js:705
aws-cdk: undefined.StackName = Test-Stack-A
aws-cdk: console.error lib/logging.js:705
aws-cdk:
aws-cdk: Stack ARN:
aws-cdk: console.log lib/logging.js:716
aws-cdk: arn:aws:cloudformation:::stack/Test-Stack-A/MockedOut
aws-cdk: console.error lib/logging.js:672
aws-cdk: undefined
aws-cdk: console.error lib/logging.js:705
aws-cdk: undefined: deploying...
aws-cdk: console.error lib/logging.js:683
aws-cdk:
aws-cdk: ✅ undefined
aws-cdk: console.error lib/logging.js:705
aws-cdk:
aws-cdk: Outputs:
aws-cdk: console.error lib/logging.js:705
aws-cdk: undefined.StackName = Test-Stack-B
aws-cdk: console.error lib/logging.js:705
aws-cdk:
aws-cdk: Stack ARN:
aws-cdk: console.log lib/logging.js:716
aws-cdk: arn:aws:cloudformation:::stack/Test-Stack-B/MockedOut
aws-cdk: console.error lib/logging.js:672
aws-cdk: undefined
aws-cdk: console.error lib/logging.js:705
aws-cdk: undefined: deploying...
aws-cdk: console.error lib/logging.js:683
aws-cdk:
aws-cdk: ✅ undefined
aws-cdk: console.error lib/logging.js:705
aws-cdk:
aws-cdk: Outputs:
aws-cdk: console.error lib/logging.js:705
aws-cdk: undefined.StackName = Test-Stack-A
aws-cdk: console.error lib/logging.js:705
aws-cdk:
aws-cdk: Stack ARN:
aws-cdk: console.log lib/logging.js:716
aws-cdk: arn:aws:cloudformation:::stack/Test-Stack-A/MockedOut
aws-cdk: console.error lib/logging.js:672
aws-cdk: undefined
aws-cdk: console.error lib/logging.js:705
aws-cdk: undefined: deploying...
aws-cdk: console.error lib/logging.js:683
aws-cdk:
aws-cdk: ✅ undefined
aws-cdk: console.error lib/logging.js:705
aws-cdk:
aws-cdk: Outputs:
aws-cdk: console.error lib/logging.js:705
aws-cdk: undefined.StackName = Test-Stack-B
aws-cdk: console.error lib/logging.js:705
aws-cdk:
aws-cdk: Stack ARN:
aws-cdk: console.log lib/logging.js:716
aws-cdk: arn:aws:cloudformation:::stack/Test-Stack-B/MockedOut
aws-cdk: PASS test/docker-new.test.ts
aws-cdk: ● Console
aws-cdk: console.error lib/logging.js:705
aws-cdk: some-name:some-tag: image already exists, skipping build and push
aws-cdk: PASS test/context-providers/generic.test.ts
aws-cdk: PASS test/diff.test.ts
aws-cdk: ● Console
aws-cdk: console.error lib/logging.js:705
aws-cdk: Including dependency stacks: A
aws-cdk: console.error lib/logging.js:705
aws-cdk: Including dependency stacks: A
aws-cdk: console.error lib/logging.js:640
aws-cdk: [Error at /resource] this is an error
aws-cdk: PASS test/api/deploy-stack.test.ts
aws-cdk: ● Console
aws-cdk: console.error lib/logging.js:705
aws-cdk: withouterrors: creating CloudFormation changeset...
aws-cdk: PASS test/commands/context-command.test.ts
aws-cdk: ● Console
aws-cdk: console.error lib/logging.js:705
aws-cdk: Context value foo reset. It will be refreshed on next synthesis
aws-cdk: PASS test/settings.test.ts
aws-cdk: PASS test/context.test.ts
aws-cdk: ● Console
aws-cdk: console.log test/context.test.ts:15
aws-cdk: Temporary working directory: /var/folders/qy/4g09xft92tl4920lgkhc111c00265b/T/aws-cdk-testLozjVu
aws-cdk: console.log test/context.test.ts:22
aws-cdk: Switching back to /Users/rdjurasaj/code/robertd/aws-cdk/packages/aws-cdk cleaning up /var/folders/qy/4g09xft92tl4920lgkhc111c00265b/T/aws-cdk-testLozjVu
aws-cdk: PASS test/context-providers/amis.test.ts
aws-cdk: ● Console
aws-cdk: console.error lib/logging.js:705
aws-cdk: Searching for AMI in 1234:asdf
aws-cdk: console.error lib/logging.js:705
aws-cdk: Searching for AMI in 1234:asdf
aws-cdk: PASS test/account-cache.test.ts (6.222s)
aws-cdk: PASS test/assets.test.ts
aws-cdk: ● Console
aws-cdk: console.error lib/logging.js:683
aws-cdk: Updated: test/assets.test.ts (file)
aws-cdk: PASS test/cdk-doctor.test.ts
aws-cdk: ● Console
aws-cdk: console.error lib/logging.js:705
aws-cdk: ℹ️ CDK Version: 1.21.1 (build ddba56a)
aws-cdk: console.error lib/logging.js:705
aws-cdk: ℹ️ No AWS environment variables
aws-cdk: console.error lib/logging.js:705
aws-cdk: ℹ️ No CDK environment variables
aws-cdk: PASS test/version.test.ts (6.365s)
aws-cdk: PASS test/archive.test.ts
aws-cdk: PASS test/cdk-docs.test.ts
aws-cdk: ● Console
aws-cdk: console.error lib/logging.js:705
aws-cdk: https://docs.aws.amazon.com/cdk/api/latest/
aws-cdk: console.warn ../../node_modules/mockery/mockery.js:218
aws-cdk: WARNING: Replacing existing mock for module: ../../lib/logging
aws-cdk: console.error lib/logging.js:705
aws-cdk: https://docs.aws.amazon.com/cdk/api/latest/
aws-cdk: PASS test/util/objects.test.ts
aws-cdk: PASS test/util/console-formatters.test.ts
aws-cdk: PASS test/serialize.test.ts
aws-cdk: PASS test/util/arrays.test.ts
aws-cdk: PASS test/yaml.test.ts
aws-cdk: PASS test/util/applydefaults.test.ts
aws-cdk: =============================== Coverage summary ===============================
aws-cdk: Statements : 63.75% ( 1349/2116 )
aws-cdk: Branches : 47.11% ( 465/987 )
aws-cdk: Functions : 64.29% ( 261/406 )
aws-cdk: Lines : 64.41% ( 1285/1995 )
aws-cdk: ================================================================================
aws-cdk: Summary of all failing tests
aws-cdk: FAIL test/init.test.ts
aws-cdk: ● verify "future flags" are added to cdk.json
aws-cdk: Could not add project AwsCdkTestarAakc.csproj to solution AwsCdkTestarAakc.sln. Error code: 127
aws-cdk: at ChildProcess.<anonymous> (../../../../../../../private/var/folders/qy/4g09xft92tl4920lgkhc111c00265b/T/aws-cdk-testarAAKC/tmp/add-project.hook.js:30:16)
aws-cdk: Test Suites: 1 failed, 26 passed, 27 total
aws-cdk: Tests: 1 failed, 113 passed, 114 total
aws-cdk: Snapshots: 0 total
aws-cdk: Time: 7.906s
aws-cdk: Ran all test suites.
aws-cdk: Error: /Users/rdjurasaj/code/robertd/aws-cdk/node_modules/jest/bin/jest.js --testEnvironment=node --coverage --coverageReporters html lcov text-summary exited with error code 1
aws-cdk: Tests failed. Total time (8.7s) | /Users/rdjurasaj/code/robertd/aws-cdk/node_modules/jest/bin/jest.js (8.7s)
aws-cdk: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
aws-cdk: npm ERR! Test failed. See above for more details.
aws-cdk: error Command failed with exit code 1.
aws-cdk: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn run build+test exited 1 in 'aws-cdk'
lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.
real 1m6.155s
user 3m20.189s
sys 0m21.005s
❌ Last command failed. Scroll up to see errors in log (search for '!!!!!!!!').
error Command failed with exit code 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment