Data flow details
Telemetry ingestion flow
-
Vehicle publishes telemetry to
cms/telemetry/{vin}MQTT topic -
IoT Core receives message and triggers IoT Rule
-
IoT Rule sends message to MSK via VPC Destination
-
Message written to
cms-telemetryKafka topic -
Flink applications consume from topic
-
Processed data written to DynamoDB and ElastiCache
-
Fleet Manager UI queries data via API Gateway
Latency:
-
Vehicle to IoT Core: <100ms
-
IoT Core to MSK: <100ms
-
MSK to Flink: <500ms
-
Flink to DynamoDB: <200ms
-
Total: <1 second
Trip detection flow
-
Flink reads telemetry from
cms-telemetrytopic -
Groups messages by VIN
-
Detects ignition state change (off → on)
-
Generates trip start event
-
Writes to
cms-tripstopic and DynamoDB -
Continues monitoring until ignition off
-
Generates trip end event with metrics
-
Updates trip record in DynamoDB
Alert generation flow
-
Flink reads telemetry from
cms-telemetrytopic -
Evaluates safety and maintenance rules
-
Detects threshold violations
-
Generates alert event
-
Writes to
cms-alertstopic and DynamoDB -
SNS notification sent (if configured)
-
Fleet Manager UI displays alert
UI query flow
-
User opens Fleet Manager UI
-
CloudFront serves React application
-
User authenticates with Cognito
-
UI requests vehicle list from API Gateway
-
Lambda queries ElastiCache for real-time state
-
Lambda queries DynamoDB for vehicle details
-
Response returned to UI
-
UI displays vehicles on map with Location Service
FleetWise Edge telemetry flow
-
FWE agent starts and publishes a checkin protobuf to
cms/fleetwise/vehicles/{vin}/checkins -
IoT Rule routes checkin to MSK
fw-checkintopic -
CampaignSyncProcessor consumes checkin, queries DynamoDB for active campaigns
-
CampaignSyncProcessor pushes decoder manifest and collection schemes to agent via IoT Core MQTT
-
Agent receives schemes and begins collecting specified CAN signals
-
Agent encodes collected signals as protobuf and publishes to
cms/fleetwise/vehicles/{vin}/signals -
IoT Rule routes telemetry to MSK
fw-telemetry-rawtopic (and S3 backup) -
FWTelemetryProcessor decodes protobuf, maps CAN signals to standard format using decoder manifest
-
Mapped telemetry written to
cms-telemetry-preprocessedKafka topic -
Downstream processors (TripProcessor, SafetyProcessor, MaintenanceProcessor) consume and process as standard telemetry
-
Processed data written to DynamoDB and ElastiCache
Latency:
-
FWE agent to IoT Core: <200ms
-
IoT Core to MSK: <100ms
-
FWTelemetryProcessor decode: <500ms
-
Downstream processing: <500ms
-
Total: <1.5 seconds
Remote command flow
-
Fleet Manager UI sends POST request to
/api/commands/{vehicleId}with command name and value -
Commands Lambda validates the request and generates a unique command ID
-
Lambda publishes command payload to
cms/commands/{vehicleId}/requestvia IoT Core MQTT (QoS 1) -
Lambda stores the command in DynamoDB with status
SENT -
Vehicle receives the MQTT message and executes the command
-
Vehicle publishes response to
cms/commands/{vehicleId}/response -
IoT Rule triggers the Command Response Handler Lambda
-
Response Handler updates command status in DynamoDB and calculates round-trip latency
-
Fleet Manager UI polls command history to display updated status
Latency:
-
API to IoT Core publish: <100ms
-
IoT Core to vehicle: <200ms
-
Vehicle execution: varies by command type
-
Vehicle response to IoT Core: <200ms
-
Response Handler processing: <100ms
-
Total (excluding execution): <600ms
Geofence evaluation flow
-
Fleet Manager UI creates a geofence via POST
/api/geofences -
Geofence stored in DynamoDB
cms-dev-storage-geofencestable -
GeofenceProcessor Flink application reads telemetry from
cms-telemetry-preprocessed -
Processor extracts vehicle position (latitude, longitude) from each message
-
Processor queries DynamoDB for active geofences (vehicle-specific and global with
vehicleId=ALL) -
Processor calculates Haversine distance from vehicle to each geofence center
-
On boundary crossing (enter or exit), processor writes a safety event to DynamoDB
-
Deduplication prevents repeated alerts while vehicle remains inside or outside the geofence
-
Fleet Manager UI displays geofence violations in the safety events view