Bridges messages sent within an nrfcloud account to an AWS IoT broker.
Uses an account device to subscribe to messages on the nrfcloud side.
Republishes messages from {stage}/{tenantId}/#
=> data/#
in the
local AWS IoT message broker.
Prerequisites
- nodejs 18+
- yarn 1.22+
- AWS credentials configured with access to build and create resources
Setup steps
- Install dependencies
yarn install
ornpm install
- Compile package
yarn compile
- Initialize context. This creates account device credentials, pulls
nrfcloud account info, creates certificates for the local aws iot broker,
and saves the resulting keys to ssm parameters.
yarn bridge-init <nrfcloud api key> -e <nrfcloud endpoint>
<nrfcloud endpoint>
defaults to https://api.nrfcloud.com
- Deploy the application
- You may first need to run cdk bootstrap with your aws account info
yarn cdk bootstrap
yarn cdk deploy
- You may first need to run cdk bootstrap with your aws account info
In addition the bridge stack, this repo also includes a demo stack that gives a good example of what you could use a bridge for. The demo stores data using Iot rules that persist data to Timestream, and starts up a grafana instance for visualizing the data.
Setup steps
- Setup bridge stack using the steps above
- Deploy the demo stack
yarn deploy-demo
- Connect some devices to nrfcloud or use the device simulator to start sending data into your account