This is a blank project for CDK development with TypeScript.
The cdk.json
file tells the CDK Toolkit how to execute your app.
npm run build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testsnpx cdk deploy
deploy this stack to your default AWS account/regionnpx cdk diff
compare deployed stack with current statenpx cdk synth
emits the synthesized CloudFormation template
A CDK stack is a collection of one or more constructs, which define AWS resources. Each CDK stack represents an AWS CloudFormation stack in your CDK app.
To define your CDK, stack follow the instructions for your preferred programming language. This stack defines the following:
- The function's logical name: MyFunction
- The location of the function code, specified in the code property. For more information, see Handler code in the AWS Cloud Development Kit (AWS CDK) API Reference.
- The REST API's logical name: HelloApi
- The API Gateway endpoint's logical name: ApiGwEndpoint
AWS CLI version 2 must be installed and configured. You can find instructions here.
Bootstrap your environment for use with the AWS CDK. You can find more info here.
cdk bootstrap --trust=ACCOUNT_ID --cloudformation-execution-policies=arn:aws:iam::aws:policy/AdministratorAccess --verbose