Adding the "AWS CDK bootstrap" action
This section describes how to add the AWS CDK bootstrap action to your workflow. The AWS CDK bootstrap action provisions a bootstrap stack in your AWS environment using the modern template. If a bootstrap stack already exists, the action updates it if necessary. Having a bootstrap stack present in AWS is a prerequisite for deploying an AWS CDK app.
For more information about bootstrapping, see Bootstrapping in the AWS Cloud Development Kit (AWS CDK) Developer Guide.
Topics
When to use this action
Use this action if you have a workflow that deploys an AWS CDK app, and you want to deploy (and update, if needed) the bootstrap stack at the same time. In this case, you would add the AWS CDK bootstrap action to the same workflow as the one that deploys your AWS CDK app.
Do not use this action if either of the following applies:
-
You already deployed a bootstrap stack using another mechanism, and you want to keep it intact (no updates).
-
You want to use a custom bootstrap template, which is not supported with the AWS CDK bootstrap action.
Prerequisites
Before you can use the AWS CDK bootstrap action, make sure you have an AWS CDK app ready. The bootstrap action will synthesize the AWS CDK app before bootstrapping. You can write your app in any programming language supported by the AWS CDK.
Make sure your AWS CDK app files are available in:
-
A CodeCatalyst source repository, or
-
A CodeCatalyst output artifact generated by another workflow action
Example workflow
Refer to the Example workflow in the Adding the "AWS CDK deploy" action for a workflow that includes the AWS CDK bootstrap action.
Adding the "AWS CDK bootstrap" action
Use the following instructions to add the AWS CDK bootstrap action to your workflow.
Prerequisites
Before you begin, make sure you have completed the tasks described in Prerequisites.
Variables produced by the "AWS CDK bootstrap" action
When the AWS CDK bootstrap action runs, it produces variables that you can use in subsequent workflow actions. For details, see "AWS CDK bootstrap" action output variables in the Workflow output variable reference.
"AWS CDK bootstrap" action definition
The AWS CDK bootstrap action is defined as a set of YAML properties inside your workflow definition file. For information about these properties, see "AWS CDK bootstrap" action reference in the Workflow definition reference.