aws / aws-iot-device-sdk-js

SDK for connecting to AWS IoT from a device using JavaScript/Node.js
Apache License 2.0
964 stars 384 forks source link

How to create device shadow automatically? #396

Closed pdt590 closed 3 years ago

pdt590 commented 3 years ago

I have a huge iot devices, i want to create device shadow for each device automatically How can i do that without using aws console?

Thank you so much

jmklix commented 3 years ago

I think you are looking for

thingShadows.register( 'RGBLedLamp', {}, function() {

For a full example you can take a look at the documentation here. Is this what you are wanting to do?

pdt590 commented 3 years ago

Thank you so much for your reply Currently, my project consist of 2 entities: IoT device and Mobile App. Mobile App communicates to IoT device via AWS-IoT. Do you know any solution that Mobile App can send request to AWS-IoT to create a thing shadow for the device? For example, AWS-Lambda can receive the request from app to do that.

jmklix commented 3 years ago

AWS Amplify might be what you are looking for and should work. But it doesn't look like it will manage the shadow for you as you will have to pub/sub to the device shadow topics.

https://github.com/aws-amplify/amplify-js/issues/728#issuecomment-384422311

pdt590 commented 3 years ago

@jmklix thank you, i will try another solution

github-actions[bot] commented 3 years ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.