Skip to main content

C4 Architecture

Last Updated: 2026-03-06 Sources: All 14 repositories, .state/discovered-accounts.json, .state/org-ous.json, .state/discovered-scps.json

Executive Summary

This document presents the NDX:Try AWS architecture using the C4 model (Context, Containers, Components). It provides hierarchical views from the system boundary down to internal component structure, covering both the Innovation Sandbox (ISB) platform and the NDX website ecosystem. The architecture follows an event-driven satellite pattern with a serverless-first approach across 117 AWS accounts.


Level 1: System Context Diagram

NDX + ISB Ecosystem


Level 2: Container Diagram - ISB Platform

ISB Core + Satellites


Level 2: Container Diagram - NDX Website

Content Platform


Level 3: Component Diagram - ISB Core

Internal Structure


Key Architectural Patterns

1. Event-Driven Satellite Architecture

Pattern: ISB Core publishes lifecycle events to EventBridge. Satellites subscribe to relevant event patterns and operate independently.

Benefits:

  • Satellites can be added/removed without ISB Core changes
  • Fault isolation (satellite failure does not break core)
  • Independent deployment and scaling

Drawbacks:

  • Eventual consistency between components
  • Distributed tracing complexity
  • No event schema versioning currently in place

2. Multi-Account Isolation (110 Pool + 7 Special)

Pattern:

  • Hub Account (568672915267): Control plane with all orchestration
  • Pool Accounts (110): Isolated workload environments
  • Management Account (955063685555): Organization root, billing
  • Supporting Accounts: Network, Perimeter, SharedServices, Audit, LogArchive

3. Serverless-First

Pattern: Lambda for all compute (21+ functions), DynamoDB for persistence, S3 for objects, Step Functions for orchestration, CodeBuild only for AWS Nuke execution.

No EC2 instances are used in the ISB platform.

4. API Gateway + Lambda + Cognito

Pattern: REST API Gateway fronts all HTTP endpoints, Cognito provides JWT authorization, Lambda functions handle per-resource-type logic.


Technology Stack Summary

ISB Core

LayerTechnologyVersion
FrontendReact + ViteReact 18
APIAPI Gateway RESTv1
ComputeLambda (Node.js)Node 20.x
OrchestrationStep FunctionsStandard
DataDynamoDBOn-demand
EventsEventBridgeCustom bus
AuthCognito + Identity CenterSAML 2.0
IaCAWS CDKv2.170.0

ISB Satellites

ComponentRuntimeCDK VersionKey Dependencies
ApproverNode 20.xv2.170.0Bedrock, Lambda Powertools, zod v3
DeployerNode 22.xN/ASecrets Manager, js-yaml
CostsTypeScriptv2.240.0Cost Explorer, EventBridge Scheduler, zod v4
Billing SeparatorTypeScriptv2.240.0Organizations, SQS, luxon, zod v4

NDX Website

ComponentTechnologyVersion
Static Site GeneratorEleventyv3.1.2
Design SystemGOV.UK Eleventy Pluginv8.3.1
HostingS3 + CloudFront-
Package ManagerYarnv4.5.0
E2E TestingPlaywrightv1.58.2

Security Boundaries

Trust Zones


Critical Path: Lease Request to Active Sandbox

  1. User submits request via Frontend (React)
  2. Frontend calls API Gateway (POST /leases)
  3. API Gateway validates JWT, invokes Leases Lambda
  4. Leases Lambda creates lease in DynamoDB, publishes LeaseRequested
  5. EventBridge routes to Approver
  6. Approver executes 19 rules + Bedrock AI, publishes LeaseApproved
  7. EventBridge routes to Lifecycle Manager and Deployer
  8. Lifecycle Manager moves account OU (Available to Active), grants IDC permissions
  9. Deployer fetches template from GitHub, deploys CloudFormation to pool account
  10. User receives access URL and logs into AWS Console

Total Time: ~30-90 seconds (auto-approve) or 1-24 hours (manual review)


References


Generated from source analysis. See 00-repo-inventory.md for full inventory.