- Newest
- Most votes
- Most comments
Hi there!
There are couple ways to do this. As you mentioned presence events can be monitored. Instead of your server doing this, you can create an AWS IoT Rule that invokes a Lambda function to process connect and disconnect events. Then you can either update a datastore of your own choosing such as DynamoDB, or you could add that data to the thing's shadow (UpdateShadow
). Then your application could query the datastore or shadow for current status.
You can also enable fleet indexing for thing connectivity. Then you can make direct queries via Fleet Indexing for state of a single device or even the aggregate of all devices.
Note: Enabling Fleet Indexing does add additional costs to both updates and when performing queries. The pricing page has more details on that.
Relevant content
- Accepted Answerasked 3 years ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated a year ago
Here are two examples for storing connectivity status in Device Shadows and DynamoDB:
https://github.com/aws-samples/connectivity-management-example-for-aws-iot-core
https://github.com/mangelino/aws-iot-device-connectivy-tracking