The cdk.json
file tells the CDK Toolkit how to execute your app.
├── infrastructure-ts # Infrastructure code via CDK(Typescript).
│ ├── bin # CDK App - Deploys the stacks
│ ├── lib #
| | ├── auth-stack.ts # Contains the Cognito Userpool
| | ├── database-stack.ts # DynamoDB table definitions
| | ├── frontend-stack.ts # Cloudfront distribution, S3 bucket for static hosting and additional resources
| | ├── rest-api-stack.ts # ApiGateway REST API to support the frontend application
| | ├── websocket-stack.ts # ApiGateway Websocket API for real-time communication
| | ├── observability-stack.ts # CloudWatch Dashboard with custom metrics
├── UI # Angular 12 Single Page Application (SPA)
└── ...
- Restore NPM packages for the project
npm install
- Bootstrap your AWS account as it's required for the automated Docker image build and deployment
cdk bootstrap aws://{ACCOUNT_ID}/{REGION}
- Synthesize the cdk stack to emits the synthesized CloudFormation template. Set up will make sure to build and package the lambda functions residing in the handlers directory.
cdk synth
- Deploy the CDK application
cdk deploy --all
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