Fleet Indexing & Shadow Access
Applied at deploy time by a CDK custom resource calling
UpdateIndexingConfiguration:
"thingIndexingConfiguration": {
"thingIndexingMode": "REGISTRY",
"namedShadowIndexingMode": "ON",
# NOT enabled: "thingConnectivityIndexingMode": "STATUS"
"filter": {
"namedShadowNames": ["iparams"] # Only 'iparams' shadow is indexed
},
# Required for GetBucketsAggregation on shadow fields — SearchIndex works
# without them, aggregation does not. AWS caps custom fields at 5; these
# three are the bounded-value device-identity fields that benefit most from
# value suggestions. Free-form fields (room, location, created_by) stay
# searchable but offer no suggestions.
"customFields": [
{"name": "shadow.name.iparams.reported.data.device.t.type", "type": "String"},
{"name": "shadow.name.iparams.reported.data.device.t.model", "type": "String"},
{"name": "shadow.name.iparams.reported.data.device.t.fw_version", "type": "String"},
],
},
"thingGroupIndexingConfiguration": {
"thingGroupIndexingMode": "ON" # Enables SearchIndex on AWS_ThingGroups
}
Online Status: Two Approaches
Approach |
Source |
Reliability |
Currently |
|---|---|---|---|
Connectivity indexing |
AWS IoT Core tracks MQTT connections automatically |
Always accurate (real-time) |
Disabled — |
iparams shadow |
Presence handler writes |
Partial — |
Active — used by dashboard |
Design decision: Connectivity indexing was intentionally not enabled. The shadow-based approach was chosen because it indicates not just that the MQTT connection is alive, but that the node has completed initialization and is ready to accept commands. A node can be “connected” at the MQTT level but not yet ready (e.g. still fetching group info, setting up shadows).
Dashboard implementation: Prefers connectivity data when available (future-proof), falls back to iparams shadow. No code changes needed when connectivity indexing is enabled.
Shadow Access by Actor
Actor |
Method |
Scope |
|---|---|---|
Admin Dashboard |
|
Read-only, |
Backend Lambdas |
|
Full read/write via REST API |
Devices |
MQTT topics |
Read/write own shadow only (via IoT Policy) |
Indexed iparams Fields
Shadow Path |
Dashboard Field |
|---|---|
|
Real-time connection status |
|
Disconnect reason |
|
Last connect/disconnect time |
|
Created By |
|
Firmware Version |
|
Device Model |
|
Device Type |
|
User Location |
|
Room |
|
Online/Offline status |