This is a blank project for TypeScript development with CDK.
The cdk.json
file tells the CDK Toolkit how to execute your app.
$ npm install -g aws-cdk
Run the following command to verify correct installation and print the version number of the AWS CDK.
$ cdk --version
Each AWS CDK app should be in its own directory, with its own local module dependencies. Create a new directory for your app. Starting in your home directory, or another directory if you prefer, issue the following commands.
$ mkdir aws-cdk-my-rds-lambda
$ cd aws-cdk-my-rds-lambda
Now initialize the app using the cdk init command, specifying the desired template ("app") and programming language.
$ cdk init app --language typescript
$ npm install @aws-cdk/aws-ec2 @aws-cdk/aws-lambda @aws-cdk/aws-rds @aws-cdk/aws-apigatewayv2 @aws-cdk/aws-apigatewayv2-integrations
npm WARN aws-cdk-my-rds-lambda@0.1.0 No repository field.
npm WARN aws-cdk-my-rds-lambda@0.1.0 No license field.
+ @aws-cdk/aws-lambda@1.89.0
+ @aws-cdk/aws-apigatewayv2@1.89.0
+ @aws-cdk/aws-ec2@1.89.0
+ @aws-cdk/aws-rds@1.89.0
+ @aws-cdk/aws-apigatewayv2-integrations@1.89.0
added 34 packages from 4 contributors and audited 785 packages in 7.156s
31 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
$ cd lambda-functions
$ npm init -y
$ npm install data-api-client uuid
$ cdk bootstrap --profile devken
⏳ Bootstrapping environment aws://xxxxxx/ap-northeast-1...
CDKToolkit: creating CloudFormation changeset...
[██████████████████████████████████████████████████████████] (3/3)
✅ Environment aws://xxxxxx/ap-northeast-1 bootstrapped.
$ npm run build && cdk deploy --profile devken
npm run build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testscdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk synth
emits the synthesized CloudFormation template