Skip to content
Empire Builder KitDocumentation
v1 Documentation

Find your next step.

Search the complete documentation, including code examples.

    Full-text search↑ ↓ navigate Enter open
    Browse documentation
    DocsCore concepts

    Foundation

    The Foundation is the one project every product shares. It provides routing, identity, events and observability once per stage, so a Slice does not have to build or pay for its own.

    On this page
    1. What it provides
    2. How Slices use it
    3. What runs when nothing is declared

    What it provides

    CapabilityResource
    RoutingOne Router per stage. Each Slice is served at its own path, and the root site at /.
    IdentityA Cognito user pool and its hosted domain, shared by every Slice’s sign-in.
    EventsAn EventBridge event bus for the stage.
    ObservabilityCloudWatch logs and basic alarms.
    DiscoveryA contract in SSM Parameter Store that Slices read to find the shared resources.
    SQL, when declaredA VPC and Aurora PostgreSQL, provisioned only after a Slice adds SQL.

    How Slices use it

    A Slice does not create a user pool or a router. Its infrastructure reads the Foundation contract for the stage and attaches to what is there. That is why a Slice’s dev and deploy targets run foundation-preflight first: the target validates the deployed Foundation contract before the Slice is operated.

    What runs when nothing is declared

    The Foundation provisions the expensive parts only on request. A workspace whose Slices all use DynamoDB has no VPC and no database cluster. Aurora appears when a Slice adds SQL, and not before.