Anomaly detection: interactive detailed architecture
Anomaly detection: every service, and what flows between them
Two agency accounts, the region's account and its readers; every service with its role, every connection labelled with what flows on it.
TTC · its own AWS account · the agency with the incident
MiWay · its own AWS account · the neighbour who hears
Planned
The region · the exchange's AWS account
Watch the feeds
Find · rules, and expected against seen
Costed upgrade
Leaving
Tell
Shared parts · costed in every use case
Readers at the region
public feeds, every 10 s
MiWay's public feeds, the same way
planned
counts
5-minute loads: counts, no rider
positions
heartbeat
timetables, when they change
all records
Parquet
positions and loads, first reader
the same records, second reader
last state
scheduled times
delay, load
a value per 5 min
band broken
upgrade
forecast missed: an anomaly
a rule fired: the vehicle and the reason
who is affected
totals, nightly
grant: MiWay's rows readable while it stands
alert
every alert
open alerts
by receiver
not taken
alert to the agency it happened at: kind, where, since, expected and seen
alert to the neighbour: affects MiWay
alert
alert
live alert feed, JSON
delivery failing
poller silent
page
delete alarms, bands
delete its vehicles
delete its part, expire snapshots
which feeds to poll
a party left
shared stop ids
audit event: who read which alert
allow or deny
sign-in token
encrypts lane and archive
GTFS-Realtime feeds positions, trip updates, alerts public, refreshed every 10 s
Passenger counters boardings and alightings per stop counts of people, never who
Lambda · the adapter 5-minute loads per route and stop published by the region, run here
EventBridge · TTC's bus alerts arrive here TTC routes them as it likes
TTC control room its own feed and vehicles first, then what neighbours cause
GTFS-Realtime feeds MiWay's, polled the same way; all seven parties' are
EventBridge · MiWay's bus alerts arrive here MiWay routes them as it likes
MiWay control room hears a TTC delay that breaks its connections
KMS · MiWay's key on its rows of the transfer totals revoked: it drops out of the lookup
Weather and events forecasts, event calendars to label an alert: snow, a game planned · not sourced, not costed
ECS on Fargate · poller reads every open feed every 10 s; timetables when they change
Kinesis Data Streams · live lane positions and loads, in order kept 24 hours, region's key
CloudWatch alarm · heartbeat poller silent for a minute? then we are blind, not the feed
Data Firehose · archive batches the lane writes Parquet
S3 + Iceberg · feed archive TIDES vehicle_locations for replays and tuning the bands
Lambda · rules feed gap, frozen, jump, dead counter; loads late or off-contract
DynamoDB · last state per vehicle: place, time, counter written once per 5 minutes
Lambda · delay and load matches each vehicle to its timetable; one value per route per 5 min
S3 · timetables every party's published GTFS the yardstick for delay
CloudWatch · metrics 1,680 series: delay and load per route and direction
CloudWatch anomaly detection an expected band per series; alarm after 2 windows outside or Chronos, the upgrade below
SageMaker · Chronos pre-trained forecaster; a large miss between forecast and seen is an anomaly upgrade · costed, about $2.4k a year more
Step Functions · leaving job stops polling; deletes alarms, state and archive part; expires snapshots
EventBridge · alert bus one event per alert routes by receiver
SNS · delivery one topic per receiver retries for an hour
SQS · undelivered alerts a receiver did not take held 14 days, replayable
Lambda · build the alert kind, party, where, since, expected and seen, who is affected
DynamoDB · alert log every alert, open or cleared kept 13 months
API Gateway · live alert feed signed-in control rooms and views WAF in front
DynamoDB · who is affected shared stops joined to transfer totals rebuilt nightly with Athena
S3 + Iceberg · transfer totals from the transfer use case each agency's rows under its key
Cognito · sign-in agency staff and apps federated identities
Verified Permissions agreements compiled to policy: which alerts a party may read
Aurora · registry parties, feed addresses, contracts, shared stop ids
CloudTrail + Object Lock every read of the alert feed written once, kept
KMS · region's keys live lane, archive, alert log
CloudWatch · monitoring failed functions, stuck delivery pages the on-call
Region's on-call told when the system itself fails not when a bus is late
Regional views disruption map, journey view, planners
crosses an account border data inside one account control: heartbeat, sign-in, rules, audit, keys, leaving orange: a costed alternative, or an input that is planned and not costed Services are recommendations, not settled. Names are illustrative; no agency has agreed to anything. Decisions 29–32, 34, 40, 51–54.
Hover a component to see what it sends and receives.