I am using the nodejs to publish, subscribe to AWS shadow. This is the code I used which I got from the following link
https://github.com/aws/aws-iot-device-sdk-js#ex