Event Flows
All events flow through the default EventBridge bus for the region. The Insight Service is both a producer (income signal, insight availability) and a consumer (new account events and institution changes from the Transactions Service, and its own income events routed internally to the funds-notifier).
Events Produced
| Source | Detail-Type | Emitted By | Description |
|---|---|---|---|
|
|
|
Emitted for each transaction on the |
|
|
|
Emitted after the miner has processed the last page of insight data for a user. Gated on |
Events Consumed
| Source | Detail-Type | Consumed By | Description |
|---|---|---|---|
|
|
|
Fired by the Transactions Service feeder when it processes a new account from an existing Plaid connection. The |
|
|
|
Fired by the Transactions Service API Lambda when a user explicitly connects a new bank institution. The |
|
|
|
The Insight Service consumes its own |
EventBridge Rules
Three EventBridge rules are owned by this service. All operate on the default event bus.
balance_alert_rule
{
"detail-type": ["new_account"],
"source": ["txn-service.feeder"]
}
| Field | Value |
|---|---|
Target queue |
|
Consumer Lambda |
|
Enabled |
Always |
income_detected_rule
{
"detail-type": ["income_txn"],
"source": ["insight-service.income"],
"detail": {
"amount": [{"numeric": ["<", -11999]}]
}
}
| Field | Value |
|---|---|
Target queue |
|
Consumer Lambda |
|
Amount filter |
|
Enabled |
Always |
account_change_detected_rule
{
"detail-type": ["new_bank_account_added"],
"source": ["txn-service.api"]
}
| Field | Value |
|---|---|
Target queue |
|
Consumer Lambda |
|
Enabled |
Controlled by |
Full Routing Diagram
┌─────────────────────────────────────────┐
│ EventBridge (default bus) │
└────────────────┬────────────────────────┘
│
┌──────────────────────────────┼──────────────────────────────┐
│ │ │
▼ ▼ ▼
balance_alert_rule income_detected_rule account_change_detected_rule
source: txn-service.feeder source: insight-service source: txn-service.api
detail-type: new_account detail-type: income_txn detail-type: new_bank_account_added
(no detail filter) amount < -11999 cents (no detail filter)
│ │ │
▼ ▼ ▼
prod-insight- prod-income- prod-insight-institution-
balance-alert-event-tap event-tap change-handler-sqs-tap
│ │ │
▼ ▼ ▼
prod-insight- prod-insight- prod-insight-institution-
balance-alert funds-notifier change-handler
Events produced by this service enter the bus from the left:
prod-insight-income-signaller ──► insight-service.income / income_txn ──► default bus
prod-insight-miner ──► insight-service.miner / user_new_insights_available ──► default bus
The user_new_insights_available event has no consumer rule defined within this service — it is consumed by downstream services (e.g. the Float Service prod-floats-income-event-tap rule).
Related Pages
-
Income Detection — income-signaller and funds-notifier detail
-
Balance Alerts — balance-alert processing logic
-
Institution Changes — institution-change-handler processing logic
-
Infrastructure — Terraform rule definitions and SQS queue configurations