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 - An S3 bucket accessible to both repositories (same AWS credentials or IAM role)
- AWS credentials configured (
~/.aws/credentials, env vars, or IAM role)
Configure the shared datastore
In the first repository, set up the S3 datastore:
$ swamp datastore setup extension @swamp/s3-datastore \
--config '{"bucket":"my-shared-bucket","prefix":"swamp","region":"us-east-1"}'Repeat in the second repository with the same bucket and prefix:
$ swamp datastore setup extension @swamp/s3-datastore \
--config '{"bucket":"my-shared-bucket","prefix":"swamp","region":"us-east-1"}'Both repositories now point to the same S3 location.
Assign namespaces
In the first repository, assign a namespace:
$ swamp datastore namespace set infraYou will see output like:
Namespace set to "infra"
Datastore: .../.swamp
Warning: Existing data remains at the old un-namespaced path.
Run 'swamp datastore namespace migrate --confirm' to move it
to the namespaced layout.Migrate existing data to the namespaced layout:
$ swamp datastore namespace migrate --confirmIn the second repository, assign a different namespace and migrate:
$ swamp datastore namespace set compute
$ swamp datastore namespace migrate --confirmVerify the setup
From either repository, list the namespaces in the shared datastore:
$ swamp datastore namespace listYou 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.