This is a blank project for TypeScript development with CDK.
The cdk.json
file tells the CDK Toolkit how to execute your app.
This project is set up like a standard TypeScript project. Initialization creates a node_modules
directory and manages dependencies via npm
(the Node.js package manager). Ensure that Node.js and npm are installed on your machine.
To install the required packages, including the AWS CDK libraries, run:
npm install
TypeScript projects need to be compiled before they can be synthesized or deployed. Run the following command to compile the TypeScript code into JavaScript:
npm run build
After building the project, you can synthesize the CloudFormation template for this code:
cdk synth
For development, you can use the watch mode to automatically compile changes when files are saved:
npm run watch
To add additional dependencies, such as other AWS CDK libraries, you can use npm to install them. For example, to install the Amazon S3 CDK library:
npm install @aws-cdk/aws-s3
After installing new libraries, remember to run npm run build
to compile the changes.
cdk ls
- list all stacks in the appcdk synth
- emits the synthesized CloudFormation templatecdk deploy
- deploy this stack to your default AWS account/regioncdk diff
- compare deployed stack with current statecdk docs
- open CDK documentation
This setup ensures that you are ready to use TypeScript for your AWS CDK projects. It provides the tools needed to manage and deploy your cloud infrastructure code effectively.