Dynamodb Datastore Bootstrap
One-shot bootstrap for @webframp/dynamodb-datastore. Ships a single provisioner model that creates a DynamoDB table (with GSI and TTL) and a least-privilege IAM managed policy, plus a workflow that runs the provisioner and then switches the current swamp repository over to the DynamoDB datastore.
Prerequisites
- AWS credentials in the default credential chain (env / profile / role) with permissions to create the DynamoDB table, enable TTL, and create the managed policy.
- The caller that will run swamp after setup must already hold, or will attach, the managed policy produced by this workflow.
What it does
provisioncreates a DynamoDB table (PAY_PER_REQUEST, pk/sk key schema, GSIgsi1for sync walks, TTL onttlattribute) and a scoped IAM managed policy granting the seven runtime actions limited to that table.- A final
command/shellstep runsswamp datastore setup extension @webframp/dynamodb-datastore --config ...to flip the repo's datastore to DynamoDB.
Running
swamp extension pull @webframp/dynamodb-datastore-bootstrap
swamp model create @webframp/dynamodb-datastore-bootstrap/provisioner \
swamp-dynamodb-provisioner
swamp model create command/shell swamp-dynamodb-setup
swamp workflow run @webframp/bootstrap-dynamodb-datastore \
--input region=us-east-1
swamp datastore statusSee the bundled README for optional inputs (table_name, policy_name),
the exact IAM policy produced, and idempotency notes.
2026.07.22.1
Added: One-shot bootstrap for @webframp/dynamodb-datastore. Ships a
provisioner model that creates a DynamoDB table (PAY_PER_REQUEST, GSI gsi1,
TTL on ttl) and a scoped IAM managed policy (7 actions), plus a workflow that
runs the provisioner and switches the repo datastore to DynamoDB.
Added: Full idempotency — re-running the provisioner against existing
infrastructure is a no-op that reports tableCreated: false and
policyCreated: false.
Added: TOCTOU-safe policy creation — concurrent provisioner runs will not fail if the policy is created between the existence check and the create call.
Resources
Provision a DynamoDB table + least-privilege IAM managed policy for @webframp/dynamodb-datastore, then switch the current repo to use DynamoDB. After completion the repo is configured. Verify with `swamp datastore status`.
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared1/1earned
- Verified public repository2/2earned