AWS CDK uses sematic versioning system to manage the CDK package release. For example, if your existing CDK stack has a version x.y.z then y represents the minor version number, which you want to upgrade to the latest. To update a minor version, use the following procedures given below:
- Update the CDK CLI version
npm install -g aws-cdk@latest
- Delete the package.lock.json file from the CDK stack.
- Update the cdk package version number in the devDependencies, dependencies.
- Run ” npm install”
- Run the “cdk deploy” command to deploy your stack with new version.
- Push to code to your Git Repository.