npm ci
npx cdk deploy
aws ssm put-parameter --name /nrfcloud-message-routing-service-monitoring/teamId --type String --value <team ID>
http <receiveFnURL>
# HTTP/1.1 201 Created
# ...
# x-nrfcloud-team-id: ...
http POST https://message-routing.nrfcloud.com/v2/destination "Authorization: Bearer $NRFCLOUD_API_KEY" <<< '{"name":"Monitoring","isEnabled":true,"config":{"type":"http","url":"<receiveFnURL>","verifySsl":true}}'
export DEVICE_ID=`uuidgen`
http POST https://api.nrfcloud.com/v1/devices/$DEVICE_ID/certificates Authorization:"Bearer $NRFCLOUD_API_KEY" Content-Type:text/plain > $DEVICE_ID.json <<< 123456
npx tsx connect.ts $DEVICE_ID.json
# Connected
echo -n 123456 | http PUT https://api.nrfcloud.com/v1/association/$DEVICE_ID Authorization:"Bearer $NRFCLOUD_API_KEY" Content-Type:text/plain
# HTTP/1.1 202 Accepted
aws ssm put-parameter --name /nrfcloud-message-routing-service-monitoring/device/clientId --type String --value "`cat $DEVICE_ID.json | jq -r '.clientId'`"
aws ssm put-parameter --name /nrfcloud-message-routing-service-monitoring/device/caCert --type String --value "`cat $DEVICE_ID.json | jq -r '.caCert'`"
aws ssm put-parameter --name /nrfcloud-message-routing-service-monitoring/device/privateKey --type String --value "`cat $DEVICE_ID.json | jq -r '.privateKey'`"
aws ssm put-parameter --name /nrfcloud-message-routing-service-monitoring/device/clientCert --type String --value "`cat $DEVICE_ID.json | jq -r '.clientCert'`"