Life ConnectLife Connect
Wiki index
Architecture
Services
Concepts
Runbooks
Infra
Swagger Docs
GitHub
Wiki index
Architecture
Services
Concepts
Runbooks
Infra
Swagger Docs
GitHub
  • Cross-cutting concepts

    • EventBridge fanout
    • Atlas Triggers
    • ECS Fargate deploy lifecycle
    • Keycloak hosting
    • Cloudflare Pages auto-deploy
    • Bitbucket Pipelines (legacy)
    • Terraform-managed envs (legacy)
  • Accounting model

    • Accounting model
    • Events catalog
    • Accounting journals
    • Plan of accounts (PCG)
    • Auxiliary accounts
    • FEC fields (Fichier des Écritures Comptables)
    • pieceReference numbering
    • Tenant matrix (payable / receivable)
    • Owner matrix (payable / receivable)
    • Take-over UI display rules
Last updated 2026-05-03

Atlas Triggers

AI-generated content

This document was generated by an AI assistant. Verify accuracy before relying on the details.

The producer side of every async ADB event is a MongoDB Atlas Trigger — a server-side function that watches a single collection's change stream and pushes a transformed message to AWS EventBridge (or, for two internal cases, to a Realm function). Triggers are NOT managed by the new infra/ Pulumi project — they live in the Atlas App Services app triggers-kkeqz and are deployed via realm-cli. The legacy management scripts are in adb-infrastructure/mongodb-atlas/realm-cli/triggers/.

At a glance

FactValueSource
Atlas projectadb-prod (65b269f45146181dace9b228)atlas projects list
Clusteradb-prod (M20, MongoDB 8.0.21, Azure FRANCE_CENTRAL)atlas clusters describe adb-prod
Realm apptriggers-kkeqz, region aws-eu-west-1, deployment LOCALrealm-cli pull
Trigger count18 (16 → AWS EventBridge, 2 → internal Realm functions)realm-cli pull
AWS targetaccount 182790345476, region eu-west-3trigger event_processors.AWS_EVENTBRIDGE.config
Time zone in payloadsEurope/Paristrigger project.requestContextData

Details

Trigger inventory

Producer-side mapping (database, collection, operations watched):

TriggerDBCollectionOps→ AWS
accounting-entry-modifiedadb-accountingdomain_object_accounting_entryI/U/R/D✅
accounting-event-modifiedadb-accountingaccounting_eventI/U/R/D✅
auxiliary-account-balance-updatedadb-accountingledger_auxiliary_accountU/R✅
payment-modifiedadb-accountingpaymentsI/U/R/D✅
contract-modifiedadb-contractscontractsI/U/R/D✅
direct-debits-status-processedadb-contractsdirect_debitsU/R✅
dunning-notice-sentadb-contractsdunningsI/U✅
file-metadata-modifiedadb-filesfilesI/U/R/D✅
index-createdadb-utilitiesindexesI✅
organization-modifiedadb-personsorganizationI/U/R/D✅
person-modifiedadb-personspersonsI/U/R/D✅
part-modifiedadb-partspartsI/U/R/D✅
parts-charge-budget-modifiedadb-partschargesI/U/R/D✅
parts-market-performance-modifiedadb-partsmarket_performancesI/U/R/D✅
ticket-event-modifiedadb-ticketseventsI/U/R/D✅
ticket-modifiedadb-ticketsticketsI/U/R/D✅
notification-definition-modifiedadb-utilitiesnotification_definitionsI/U/R/D❌ → Realm fn
notification-ttl-deletedadb-utilitiesnotifications_ttlD❌ → Realm fn

Database naming convention

Each microservice owns its own MongoDB database, named identically: adb-<service> (e.g. adb-contracts, adb-accounting). The adb-tickets database exists and triggers fire on it even though there's no adb-tickets/ directory in the monorepo today.

How to inspect or change a trigger

See MongoDB Atlas — Realm CLI setup for the install + auth steps. Then:

realm-cli login --api-key "$MONGODB_ATLAS_PUBLIC_API_KEY" --private-api-key "$MONGODB_ATLAS_PRIVATE_API_KEY"
realm-cli pull --remote triggers-kkeqz --local /tmp/realm
ls /tmp/realm/triggers
# Each <name>.json has config.{database,collection,operation_types} + event_processors.AWS_EVENTBRIDGE.config

To deploy a change, edit the JSON in the legacy adb-infrastructure/mongodb-atlas/realm-cli/triggers/ checkout (or in your realm-cli pull working copy) and realm-cli push --remote triggers-kkeqz.

Open questions

  • Why does every trigger's project set event: "CREATED" and operationType: 1 as static literals? Real values should come from the change-stream metadata.
  • Atlas Triggers don't appear in any IaC — they're managed by hand-edited JSON in adb-infrastructure/. Should they move to a Pulumi MongoDB Atlas provider integration so the new infra/ is the single deploy surface?
  • The notification-* triggers don't go to AWS — they call a Realm function. The function source is in realm-pull/functions/. We don't currently document what those functions actually do.
Edit this page
Last Updated:
Contributors: Yevhenii Khudolii
Prev
EventBridge fanout
Next
ECS Fargate deploy lifecycle