Execute this command to create a blank project with TypeScript.
cdk init --language typescript
Now this is a blank project for CDK development with TypeScript.
The cdk.json
file tells the CDK Toolkit how to execute your app.
Export your credentials before creating the CDK environment
- export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
- export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
- export AWS_DEFAULT_REGION=us-west-2
creating the CDK environment. This command below only needs to be executed once, per account and per region.
cdk bootstrap
npm run build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testscdk deploy
deploy this stack to your default AWS account/regioncdk deploy --all
deploy all stack to your default AWS account/regioncdk destroy --all
destroy all stack of the your default AWS account/regioncdk diff
compare deployed stack with current statecdk synth
emits the synthesized CloudFormation templatecdk list
list all stacks