This is a blank project for TypeScript development with CDK.
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 testscdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk synth
emits the synthesized CloudFormation template
This assumes you have aws cli installed and configured with your credentials.
- npm i
- npm run build
- cdk synth
- cdk diff
- cdk deploy
Test command:
This sends a message to the broker_interface
topic.
curl -XPOST https://c02zu014q2.execute-api.eu-central-1.amazonaws.com/prod/message/broker_interface -H "Content-Type: application/json" -d '{"Hello": "World"}'
You can test if it works by subscribing to the broker_interface
topic in the AWS IoT test section. If you have created an AWS IoT Analytics projects that subscribe to broker_interface
topic, the incoming messages should be visible on the dashboard a few minutes later.
Please refer to the following tutorial to learn more about using AWS solution constructs.