Event Flows
All events flow through the default EventBridge bus for the region. The Insight Service is both a producer (insight availability) and a consumer (new account events and institution changes from the Transactions Service).
Events Produced
| Source | Detail-Type | Emitted By | Description |
|---|---|---|---|
|
|
|
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 |
|
|
|
Fired by the Transactions Service refiner once a user’s transaction batch finishes — only on the last page, and only when the batch contained new transactions, so there is no per-page duplication. A delete-only batch produces no event. The |
|
|
|
The Insight Service consumes its own |
EventBridge Rules
Two EventBridge rules are owned by this service. Both 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 |
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 account_change_detected_rule
source: txn-service.feeder source: txn-service.api
detail-type: new_account detail-type: new_bank_account_added
(no detail filter) (no detail filter)
│ │
▼ ▼
prod-insight- prod-insight-institution-
balance-alert-event-tap change-handler-sqs-tap
│ │
▼ ▼
prod-insight- prod-insight-institution-
balance-alert change-handler
Events produced by this service enter the bus from the left:
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
-
Balance Alerts — balance-alert processing logic
-
Institution Changes — institution-change-handler processing logic
-
Infrastructure — Terraform rule definitions and SQS queue configurations