- Newest
- Most votes
- Most comments
Hi,
you can provide keyPath, certPath and other settings as command line parameters. So you would run your device with a command such as:
mydevice.js /path/to/key /path/to/cert
KR,
Philipp
Good morning AWS-User-9708397,
Thanks for raising your concern.
If I understand correctly, you'd like to build a NodeJS app to remotely Command/Control your IoT devices; but the code samples you came across appear so tightly coupled to the devices (certificates) themselves that you are afraid it might not be scalable. Is that accurate?
If so, then you are probably right. One of the recommended approach for this use case would be to decouple your NodeJS App from your devices (by using AWS Amplify for example).
With AWS Amplify, you can build your desired NodeJS App, add App user identities to it and use those same identities in the cloud to connect to AWS IoT Core. Then using standard MQTT Publish/Subscribe/Connect functions, you can communicate with any (subset) of your devices via AWS IoT Core.
Here is a very detailed example for reference.
Let us know if that was helpful!
Relevant content
- asked a year ago
- asked 6 days ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 5 months ago