Skip to main content

@swamp/s3-datastore-bootstrap

v2026.04.22.3

One-shot bootstrap for @swamp/s3-datastore. Ships a single provisioner model that creates an S3 bucket and a least-privilege IAM managed policy, plus a workflow that runs the provisioner and then switches the current swamp repository over to the S3 datastore.

Prerequisites

  • AWS credentials in the default credential chain (env / profile / role) with permissions to create the bucket, create the managed policy, and exercise the runtime actions documented in @swamp/s3-datastore.
  • The caller that will run swamp after setup must already hold, or will attach, the managed policy produced by this workflow.

What it does

  1. provision creates a private S3 bucket (versioning on, SSE-S3, public access blocked) and a scoped IAM managed policy granting the four runtime IAM actions (ListBucket, GetObject, PutObject, DeleteObject) limited to that bucket.
  2. A final command/shell step runs swamp datastore setup extension @swamp/s3-datastore --config ... to flip the repo's datastore to S3.

Running

swamp extension pull @swamp/s3-datastore-bootstrap

swamp model create @swamp/s3-datastore-bootstrap/provisioner \
  swamp-s3-datastore-provisioner

# Edit the instance so globalArguments are wired to workflow inputs:
#   bucket_name: ${{ inputs.bucket_name }}
#   region:      ${{ inputs.region }}
#   prefix:      ${{ inputs.prefix }}
#   policy_name: ${{ inputs.policy_name }}
swamp model edit swamp-s3-datastore-provisioner

# The command/shell instance used by the final workflow step
swamp model create command/shell swamp-s3-datastore-setup

swamp workflow run bootstrap-s3-datastore \
  --input bucket_name=my-swamp-state \
  --input region=us-east-1

swamp datastore status

See the bundled README for optional inputs (prefix, policy_name), the exact IAM policy produced, and idempotency notes.

Repository

https://github.com/systeminit/swamp-extensions

Labels

datastorebootstrapawss3

Quality score

Verified by Swamp

How well-documented and verifiable this extension is.

100%

Grade A

  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types1/1earned
  • Has description1/1earned
  • At least one platform tag (or universal)1/1earned
  • Two or more platform tags (or universal)1/1earned
  • License declared1/1earned
  • Verified public repository2/2earned

Install

$ swamp extension pull @swamp/s3-datastore-bootstrap

@swamp/s3-datastore-bootstrap/provisionerv2026.04.22.3provisioner.ts
provisionCreate/verify the S3 bucket and the scoped IAM managed policy for @swamp/s3-datastore.

Resources

state(infinite)— S3 bucket + IAM managed policy provisioned for swamp.

@swamp/bootstrap-s3-datastoref06908d9-bfe7-40cd-b797-686b1e80b5aa

Provision an S3 bucket + least-privilege IAM managed policy for @swamp/s3-datastore, then switch the current repo to use S3.

infraCreate the S3 bucket and IAM managed policy.
1.provisionswamp-s3-datastore-provisioner.provision— Run the provisioner model to create/verify the bucket + scoped managed policy. Instance `swamp-s3-datastore-provisioner` must be pre-created with globalArguments wired to the workflow inputs: bucket_name: ${{ inputs.bucket_name }} region: ${{ inputs.region }} prefix: ${{ inputs.prefix }} policy_name: ${{ inputs.policy_name }}
configurePoint this repo's datastore at the new bucket.
1.run-setupswamp-s3-datastore-setup.execute— Run `swamp datastore setup extension @swamp/s3-datastore`.