What is the best way to determine the connection state of an AWS IoT device?

1.9k views Asked by At

How can I determine if a particular AWS IoT device is currently online? I could send an MQTT message and make the device answer it. But is there some implicit way on seeing if a device is online/connected?

2

There are 2 answers

0
Maciej Dzikowicki On

You can also use Fleet Indexing with enabled Connectivity Indexing https://docs.aws.amazon.com/iot/latest/developerguide/managing-index.html and do search for your deviceId. In results you can check connectivity. Also you can search for all connected devices by using search with query connectivity.connected:true

0
Peter G. On

Ok, there is a dedicated internal MQTT topic for it. Subscribe to $aws/events/presence/# to get presence events for all your devices.