There are two approaches as to how you can get the shadow data:
- Using the REST API: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-rest-api.html
- Using MQTT-SNL: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html
The following example used the MQTTS approach to fetch the shadow data. Whenever we want to fetch the data of a Thing, we publish an empty packet to the $aws/things/Pi3-DHT11-Node/shadow/get topic. Depending on whether the state was accepted or rejected, we will get a response on $aws/things/Pi3-DHT11-Node/shadow/get/accepted or $aws/things/Pi3-DHT11-Node/shadow/get/rejected, respectively.
For testing the data fetch, you can either use the same Raspberry ...