B/AWS

Hermes’ Delivery Office

Terracotta & ink

Hermes serves two customer accounts. Standard deliveries use a shared worker cell across two AZs; an enterprise customer gets a separate account, queue, worker and ledger.

1 · Prompt

Authored brief · fictional system

Design a fictional cross-account messaging SaaS. Bind authenticated publisher accounts to tenants; never trust a tenant ID in event detail. Show operator authentication, tenant-route administration, a pooled SQS worker cell with Fargate consumers in two private AZ placements, and a dedicated delivery account with its own bus, queue, Lambda, ledger and DLQ. Keep SQS and DynamoDB regional, outside AZ boxes.Read full promptClose full prompt
Design a fictional cross-account messaging SaaS. Bind authenticated publisher accounts to tenants; never trust a tenant ID in event detail. Show operator authentication, tenant-route administration, a pooled SQS worker cell with Fargate consumers in two private AZ placements, and a dedicated delivery account with its own bus, queue, Lambda, ledger and DLQ. Keep SQS and DynamoDB regional, outside AZ boxes.

2 · Diagram

Which tenant is allowed to publish, consume and replay each message?

Whole diagram fitted. For larger labels, turn off “Fit whole diagram” and pan, or open the full-size SVG.

Hermes’ Delivery Office: Tenant A publisher, Tenant B publisher, Operator sign-in, Tenant controller, Authorized ingress, Pooled delivery queue, Pooled failed work, Delivery tasks A, Delivery tasks B, Pooled tenant ledger, Tenant B ingress, Tenant B queue, Tenant B worker, Tenant B ledger, Tenant B failed work. Relationships and limits are explained below.
Download SVGOpen full drawing ↗Open native render ↗

Mermaid source

Download .mmd

Semantic content and gallery-only boundary/flow annotations stay in this file. The drawing treatment is applied after layout.

architecture-beta
%% Fictional multi-tenant messaging. Account identity, not caller-supplied event detail, selects tenant routes.
%% @boundary customerA account
%% @boundary customerAr region
%% @boundary customerB account
%% @boundary customerBr region
%% @boundary platform account
%% @boundary primary region
%% @boundary admin logical
%% @boundary workersVpc vpc
%% @boundary zoneA az
%% @boundary zoneB az
%% @boundary silo account
%% @boundary siloRegion region
group customerA(cloud)[Account: Tenant A]
group customerAr(cloud)[Region: Primary] in customerA
group customerB(cloud)[Account: Tenant B]
group customerBr(cloud)[Region: Primary] in customerB
group platform(cloud)[Account: Delivery platform]
group primary(cloud)[Region: Primary] in platform
group admin(cloud)[Logical: Tenant administration] in primary
group workersVpc(cloud)[VPC: Worker cell] in primary
group zoneA(cloud)[AZ: A - private tasks] in workersVpc
group zoneB(cloud)[AZ: B - private tasks] in workersVpc
group silo(cloud)[Account: Tenant B silo]
group siloRegion(cloud)[Region: Primary] in silo
service publisherA(aws:lambda)[Tenant A publisher] in customerAr
service publisherB(aws:lambda)[Tenant B publisher] in customerBr
service identity(aws:cognito)[Operator sign-in] in admin
service controller(aws:lambda)[Tenant controller] in admin
service bus(aws:eventbridge)[Authorized ingress] in primary
service queue(aws:sqs)[Pooled delivery queue] in primary
service dlq(aws:sqs)[Pooled failed work] in primary
service workerA(aws:fargate)[Delivery tasks A] in zoneA
service workerB(aws:fargate)[Delivery tasks B] in zoneB
service ledger(aws:dynamodb)[Pooled tenant ledger] in primary
service siloBus(aws:eventbridge)[Tenant B ingress] in siloRegion
service siloQueue(aws:sqs)[Tenant B queue] in siloRegion
service siloWorker(aws:lambda)[Tenant B worker] in siloRegion
service siloLedger(aws:dynamodb)[Tenant B ledger] in siloRegion
service siloDlq(aws:sqs)[Tenant B failed work] in siloRegion
%% @edge publisherA bus event | SigV4 PutEvents under Tenant A workload role; bus policy restricts allowed principal/account and source.
publisherA:R --> L:bus
%% @edge publisherB bus event | Tenant B publishes under its own role; account-to-tenant bindings are configured by the platform.
publisherB:R --> T:bus
%% @edge identity controller identity | Authenticated operator JWT authorizes tenant administration; this is credential flow, not a Cognito RPC.
identity:R --> L:controller
%% @edge controller bus control | Installs allowlisted account-to-tenant routes; do not trust a tenant ID supplied in event detail.
controller:B --> B:bus
%% @edge bus queue event | Rules select the pooled tenant route and deliver through a queue resource policy.
bus:R --> L:queue
%% @edge queue workerA event | Private tasks poll SQS over a configured interface endpoint; delivery is at least once.
queue:R --> L:workerA
%% @edge queue workerB event | A second AZ runs independent consumers of the regional queue.
queue:B --> B:workerB
%% @edge workerA ledger request | Conditional idempotency records and tenant-keyed state via a DynamoDB gateway endpoint.
workerA:B --> T:ledger
%% @edge workerB ledger request | Same regional tenant ledger; no per-AZ DynamoDB clone is implied.
workerB:L --> R:ledger
%% @edge queue dlq event | Configured redrive after unsuccessful receives; controlled replay is a separate operation.
queue:T --> B:dlq
%% @edge bus siloBus event | Cross-account EventBridge forwarding needs a sender role and destination bus policy.
bus:B --> L:siloBus
%% @edge siloBus siloQueue event | Dedicated account queue receives only the allowlisted Tenant B route.
siloBus:R --> L:siloQueue
%% @edge siloQueue siloWorker event | Lambda event-source mapping polls the dedicated regional queue.
siloQueue:R --> L:siloWorker
%% @edge siloWorker siloLedger request | Dedicated state and execution role; no pooled-data access is required.
siloWorker:R --> L:siloLedger
%% @edge siloQueue siloDlq event | Dedicated redrive destination with an explicit source-queue allow policy.
siloQueue:B --> T:siloDlq

Reproduce this collection from the Beautiflow repository:

bun scripts/build-boring-diagrams.ts

Measured evidence

Full evidence JSON
Native geometry
0 findings across 8 measured checks
Styled render integrity
0 element, plain-label, ID or reference findings
Authored annotations
12 boundaries · 15 relationship meanings
AWS configuration
Not validated

These checks do not establish visual quality, every decorative mark, browser glyph ink, edge-label boxes or deployed AWS correctness. Architecture has guarded transforms, not automatic polish.

Source SHA-256

732f53f787b48a2bd31f6e07e28afead4778745970bf7d1878aa6837315c5051
Read all 15 relationships

Line patterns distinguish requests, credentials, events, replication, configuration/control and recovery. Hover a styled connector for its meaning. Native layout preserves routes but does not include these gallery annotations.

Authored flow meanings, not deployed AWS configuration evidence
FromToKindMeaning
Tenant A publisherAuthorized ingresseventSigV4 PutEvents under Tenant A workload role; bus policy restricts allowed principal/account and source.
Tenant B publisherAuthorized ingresseventTenant B publishes under its own role; account-to-tenant bindings are configured by the platform.
Operator sign-inTenant controlleridentityAuthenticated operator JWT authorizes tenant administration; this is credential flow, not a Cognito RPC.
Tenant controllerAuthorized ingresscontrolInstalls allowlisted account-to-tenant routes; do not trust a tenant ID supplied in event detail.
Authorized ingressPooled delivery queueeventRules select the pooled tenant route and deliver through a queue resource policy.
Pooled delivery queueDelivery tasks AeventPrivate tasks poll SQS over a configured interface endpoint; delivery is at least once.
Pooled delivery queueDelivery tasks BeventA second AZ runs independent consumers of the regional queue.
Delivery tasks APooled tenant ledgerrequestConditional idempotency records and tenant-keyed state via a DynamoDB gateway endpoint.
Delivery tasks BPooled tenant ledgerrequestSame regional tenant ledger; no per-AZ DynamoDB clone is implied.
Pooled delivery queuePooled failed workeventConfigured redrive after unsuccessful receives; controlled replay is a separate operation.
Authorized ingressTenant B ingresseventCross-account EventBridge forwarding needs a sender role and destination bus policy.
Tenant B ingressTenant B queueeventDedicated account queue receives only the allowlisted Tenant B route.
Tenant B queueTenant B workereventLambda event-source mapping polls the dedicated regional queue.
Tenant B workerTenant B ledgerrequestDedicated state and execution role; no pooled-data access is required.
Tenant B queueTenant B failed workeventDedicated redrive destination with an explicit source-queue allow policy.
Architecture assumptions & omissions
  • Tenant A and B are illustrative customers. Workload roles sign PutEvents; resource policies and an account-to-tenant allowlist constrain ingress and routing. Multi-tenant publishers within a single customer account would need a separately validated ingress contract.
  • AZ A/B contain private Fargate tasks, not independent SQS or DynamoDB instances. Assumed SQS interface endpoints have ENIs in enabled AZs; DynamoDB uses a gateway endpoint. Endpoint and security-group configuration is not drawn.
  • Cross-account bus forwarding requires a sender role, destination bus policy and explicit target permissions. Dedicated workers have no intended pooled-state access. These policies are design requirements, not validated IAM documents.
  • Queue arrows denote polling and configured redrive. Consumers need idempotency, tenant-scoped state access and a privileged, audited replay process. A shared queue is a noisy-neighbour trade-off; stricter service tiers may need more queue partitions. Recipient transport and autoscaling policies are omitted.