@cubesoft/nx-cdk
v5.1.0
Published
## Getting started
Downloads
254
Readme
nx-cdk
Getting started
Prerequisite
This module is based on Nx, you will need to set up an Nx workspace before you can use nx-cdk.
npx create-nx-workspace
Installation
npm i -D @cubesoft/nx-cdk
Creating a nx-cdk project
nx g @cubesoft/nx-cdk:nx-cdk <name> [--dry-run]
Bootstrap an AWS account
Setup the env: { account: 'XXXXXXXXXXXX', region: 'us-east-1' }
property in <project>/src/app.ts
and run the command below.
nx bootstrap <project> [--profile <profilename>] # optionally provide an AWS profile name
Deploying the CDK Stack to AWS
Run the command below to deploy the cdk stack to AWS.
nx deploy <project> [--profile <profilename>] # optionally provide an AWS profile name
Destroying a CDK Stack and remove it from AWS
Run the command below to destroy the cdk stack on AWS.
nx destroy <project> [--profile <profilename>] # optionally provide an AWS profile name
Running unit tests
Run nx test <project>
to execute the unit tests via Jest.