Now that our initial AWS CDK project has been created, it's time to deploy it!
In this quick lesson we're going to learn:
cdk diff
command in order to see the difference between our currently deployed stack and the stack we're about to deploycdk deploy
in order to deploy a CDK stack to AWSRunning cdk diff
error with:
"Unable to resolve AWS account to use. It must be either configured when you define your CDK or through the environment"
I assume we need to configure an account as a prerequisite?
Yes, I followed this AWS tutorial:
https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html
Hi Tomasz,
It would be great if you can break down some major steps in the CDK deployment? For example, it compiles the cdk code, generates the cloudformation template, packages it in a zip file, creates S3 bucket and loads code there, runs the cloudformation command to create cloudformation stack, deploys the lambda function (if it is for aws lambda project) etc.
I would also want to learn what are the minimum permissions (or policies) needed to do the cdk deployment? Like write access to S3 for cloudformation stack, create stack permission etc. The cdk bootstrap
seems providing too broad power, it goes against the best practice of AWS least privilege.
Thank you