Installation
Follow these steps to install the Nx CDK Plugin in an existing Nx workspace.
1) Add the package
Choose your package manager:
# npm
npm install -D @mhshahzad/nx-cdk-deploy aws-cdk
# yarn
yarn add -D @mhshahzad/nx-cdk-deploy aws-cdk
# pnpm
pnpm add -D @mhshahzad/nx-cdk-deploy aws-cdk
Notes:
- The plugin is TypeScript-first and expects Nx 16+.
- AWS CDK v2 is recommended.
2) Verify Nx and TypeScript
Ensure your workspace has:
- Nx 16+
- Typescript configured for your repo
3) Bootstrap AWS CDK (first time per account/region)
cdk bootstrap aws://<ACCOUNT_ID>/<REGION>
This creates the CDK toolkit stack needed for deployments.
4) Configure AWS credentials
Make sure your AWS CLI is configured and can assume/deploy to the target account.
aws configure
5) Next steps
- ✅ Confirm the Prerequisites
- 🚀 Head to the Quick Start
- 📚 Explore Generators and Executors