Adding the 'AWS CDK deploy' action - Amazon CodeCatalyst

Adding the 'AWS CDK deploy' action

Use the following instructions to add the AWS CDK deploy action to your workflow.

Before you begin

Before you can add the AWS CDK deploy action to your workflow, complete the following tasks:

  1. Have an AWS CDK app ready. You can write your AWS CDK app using AWS CDK v1 or v2, in any programming language supported by the AWS CDK. Make sure your AWS CDK app files are available in:

  2. Bootstrap your AWS environment. To bootstrap, you can:

    • Use one of the methods described in How to bootstrap in the AWS Cloud Development Kit (AWS CDK) Developer Guide.

    • Use the AWS CDK bootstrap action. You can add this action in the same workflow as your AWS CDK deploy, or in a different one. Just make sure the bootstrap action runs at least once prior to running the AWS CDK deploy action so that the necessary resources are in place. For more information about theAWS CDK bootstrap action, see Bootstrapping an AWS CDK app with a workflow.

      For more information about bootstrapping, see Bootstrapping in the AWS Cloud Development Kit (AWS CDK) Developer Guide.

Visual
To add the 'AWS CDK deploy' action using the visual editor
  1. Open the CodeCatalyst console at https://codecatalyst.aws/.

  2. Choose your project.

  3. In the navigation pane, choose CI/CD, and then choose Workflows.

  4. Choose the name of your workflow. You can filter by the source repository or branch name where the workflow is defined, or filter by workflow name or status.

  5. Choose Edit.

  6. Choose Visual.

  7. At the top-left, choose + Actions to open the action catalog.

  8. From the drop-down list, choose Amazon CodeCatalyst.

  9. Search for the AWS CDK deploy action, and do one of the following:

    • Choose the plus sign (+) to add the action to the workflow diagram and open its configuration pane.

      Or

    • Choose AWS CDK deploy. The action details dialog box appears. On this dialog box:

      • (Optional) Choose Download to view the action's source code.

      • Choose Add to workflow to add the action to the workflow diagram and open its configuration pane.

  10. In the Inputs and Configuration tabs, complete the fields according to your needs. For a description of each field, see the 'AWS CDK deploy' action YAML. This reference provides detailed information about each field (and corresponding YAML property value) as it appears in both the YAML and visual editors.

  11. (Optional) Choose Validate to validate the workflow's YAML code before committing.

  12. Choose Commit, enter a commit message, and then choose Commit again.

    Note

    If your AWS CDK deploy action fails with an npm install error, see How do I fix "npm install" errors? for information about how to fix the error.

YAML
To add the 'AWS CDK deploy' action using the YAML editor
  1. Open the CodeCatalyst console at https://codecatalyst.aws/.

  2. Choose your project.

  3. In the navigation pane, choose CI/CD, and then choose Workflows.

  4. Choose the name of your workflow. You can filter by the source repository or branch name where the workflow is defined, or filter by workflow name or status.

  5. Choose Edit.

  6. Choose YAML.

  7. At the top-left, choose + Actions to open the action catalog.

  8. From the drop-down list, choose Amazon CodeCatalyst.

  9. Search for the AWS CDK deploy action, and do one of the following:

    • Choose the plus sign (+) to add the action to the workflow diagram and open its configuration pane.

      Or

    • Choose AWS CDK deploy. The action details dialog box appears. On this dialog box:

      • (Optional) Choose Download to view the action's source code.

      • Choose Add to workflow to add the action to the workflow diagram and open its configuration pane.

  10. Modify the properties in the YAML code according to your needs. An explanation of each available property is provided in the 'AWS CDK deploy' action YAML.

  11. (Optional) Choose Validate to validate the workflow's YAML code before committing.

  12. Choose Commit, enter a commit message, and then choose Commit again.

    Note

    If your AWS CDK deploy action fails with an npm install error, see How do I fix "npm install" errors? for information about how to fix the error.