Skip to main content

SET UP A GIGA-SWAMP

This guide shows you how to set up a shared datastore with two repositories from scratch, using S3 as the shared backend.

Prerequisites

  • Two Swamp repositories initialized with swamp repo init
  • swamp auth login completed, or SWAMP_API_KEY set with datastore:* scope
  • An S3 bucket accessible to both repositories (same AWS credentials or IAM role)
  • AWS credentials configured (env vars, ~/.aws/credentials, an SSO profile in ~/.aws/config, or an IAM role) — refer to Authenticate to AWS with SSO for the SSO sequence

Configure the shared datastore

In the first repository, set up the S3 datastore with a namespace:

$ swamp datastore setup extension @swamp/s3-datastore \
    --namespace infra \
    --config '{"bucket":"my-shared-bucket","prefix":"swamp","region":"us-east-1"}'

Repeat in the second repository with the same bucket and prefix, but a different namespace:

$ swamp datastore setup extension @swamp/s3-datastore \
    --namespace compute \
    --config '{"bucket":"my-shared-bucket","prefix":"swamp","region":"us-east-1"}'

Both repositories now point to the same S3 location, with data scoped under their respective namespaces.

Verify the setup

From either repository, list the namespaces in the shared datastore:

$ swamp datastore namespace list

You will see output like:

┌───────────┬──────────────────────────────────────┬──────────────┬─────────┐
│ namespace │ repoId                               │ registeredAt │ current │
├───────────┼──────────────────────────────────────┼──────────────┼─────────┤
│ infra     │ <repo-1-uuid>                        │ 2026-06-04   │         │
│ compute   │ <repo-2-uuid>                        │ 2026-06-04   │ *       │
└───────────┴──────────────────────────────────────┴──────────────┴─────────┘

The * marks which namespace belongs to the current repository. Both namespaces share the same underlying S3 bucket.

Verify cross-namespace visibility

Run a model method in one namespace to produce data, then query it from the other namespace using the namespace prefix syntax:

data.latest("infra:my-model", "result")

Refer to Query Across Namespaces for the full CEL query syntax.