The cdk.json
file tells the CDK Toolkit how to execute your app.
-
Rename the
cdk.context.example.json
file tocdk.context.json
and replace all the values with predefined values for your stack (required). -
Run
yarn
(recommended) ornpm install
-
Run
yarn cdk deploy --profile profileName
to deploy the stack to your specified region. You can skip providing the profile name if it isdefault
. You can learn about creating profiles using the aws-cli here. -
You will notice two stacks created, and one will be a nested stack that holds the EC2 instance and the parent stack the entire VPC setup.
yarn build
compile typescript to jsyarn watch
watch for changes and compileyarn test
perform the jest unit testsyarn cdk deploy
deploy this stack to your default AWS account/regionyarn cdk diff
compare deployed stack with current stateyarn cdk synth
emits the synthesized CloudFormation template