CDK Deploy (to your account)
Bootstrapping an environment
The first time you deploy an AWS CDK app into an environment (account/region), you can install a “bootstrap stack”. This stack includes resources that are used in the toolkit’s operation. For example, the stack includes an S3 bucket that is used to store templates and assets during the deployment process.
You can use the cdk bootstrap command to install the bootstrap stack into an environment:
cdk bootstrapThen:
⏳ Bootstrapping environment aws://123456789012/us-east-1...
...If you are returned an Access Denied message at this step, verify that you haveconfigured the AWS CLI correctly
cloudformation:CreateChangeSetaccount/session
Let’s deploy
Use cdk deploy to deploy a CDK app:
cdk deploy
You will first be informed of security-related changes that the CDK is going to perform on your behalf, if there are any security-related changes
Output should look like the following, where ACCOUNT-ID is your account ID, REGION is the region in which you created the app, and STACK-ID is the unique identifier for your stack:
CdkWorkshopStack: deploying...
CdkWorkshopStack: creating CloudFormation changeset...
✅ CdkWorkshopStack
Stack ARN:
arn:aws:cloudformation:REGION:ACCOUNT-ID:stack/CdkWorkshopStack/STACK-IDThe CloudFormation Console
CDK apps are deployed through AWS CloudFormation. Each CDK stack maps 1:1 with CloudFormation stack.
This means that you can use the AWS CloudFormation console in order to manage your stacks.
Let’s take a look at the AWS CloudFormation console.
You will likely see something like this (if you don’t, make sure you are in the correct region):

If you select CdkWorkshopStack and open the Resources tab, you will see the physical identities of our resources:
