This project was deployed using
cdk init -a app --language=typescript
The cdk.json file tells the CDK Toolkit how to execute your app.
-aws-cli
-aws-cdk
-nvm [ensure correct version of node]
Nvm install 20.11.0
Nvm use 20.11.0
nvm install-latest-npm
-npm [installs npx since 5.0]
-clone repository
-cd into repository
-run npm install
if necessary, install them individually from package.json
"@aws-cdk/aws-apigateway": "^1.204.0",
"@aws-cdk/aws-dynamodb": "^1.204.0",
"@aws-cdk/aws-lambda": "^1.204.0",
in the terminal, like so
npm i @aws-cdk/aws-apigateway
Be sure to install the plugins for aws and aws-cli as well as sam and aws-cdk-lib
whether you are using terminal and CLI or an IDK with the AWS SDK run locally and/or deploy to aws
let environment = 'stage'; // Adjust this manually as needed
-
npm run buildcompile typescript to js -
npm run watchwatch for changes and compile -
npm run testperform the jest unit tests -
cdk bootstapallows you to authenticate if you don't already have a .aws/credentials -
cdk diffcompare deployed stack with current state -
cdk synthemits the synthesized CloudFormation template -
cdk deploydeploy this stack to your default AWS account/region -
cdk destroydestroy this stack to your default AWS account/region
export ENVIRONMENT=dev cdk synth cdk deploy
export ENVIRONMENT=stage cdk synth cdk deploy
export ENVIRONMENT=prod cdk synth cdk deploy