Skip to main content

Elasticache Datastore Bootstrap

@webframp/elasticache-datastore-bootstrapv2026.10.22.1· Apache-2.0· 4d agoBEHAVIORSWORKFLOWS
01README

One-shot bootstrap for @webframp/valkey-datastore targeting AWS ElastiCache Serverless (Valkey). Creates a serverless cache, a VPC security group for access, and a least-privilege IAM managed policy, then switches the current swamp repository to the Valkey datastore.

Prerequisites

  • AWS credentials with permissions to create ElastiCache serverless caches, EC2 security groups, and IAM managed policies
  • A VPC with at least one subnet (the cache is deployed into the default VPC unless overridden)

What it does

  1. provision creates an ElastiCache Serverless cache (Valkey engine, TLS enabled), a security group allowing inbound on port 6379 from the caller's VPC CIDR, and a scoped IAM managed policy.
  2. A final command/shell step runs swamp datastore setup extension @webframp/valkey-datastore --config ... to flip the repo's datastore to Valkey.

Running

swamp extension pull @webframp/elasticache-datastore-bootstrap

swamp model create @webframp/elasticache-datastore-bootstrap/provisioner \
  swamp-valkey-provisioner

swamp model create command/shell swamp-valkey-setup

swamp workflow run @webframp/bootstrap-elasticache-datastore \
  --input region=us-east-1

swamp datastore status

See the bundled README for optional inputs (cache_name, vpc_id, subnet_ids, policy_name) and the exact IAM policy produced.

02Release Notes

2026.10.22.1

Fixed: Existing definitions created against an earlier version were stranded on upgrade. The model shipped new versions without a corresponding upgrades chain, so swamp could not migrate a definition's typeVersion and logged a warning that global arguments would not be migrated. This release backfills the full upgrade chain through every shipped version and terminates it at the current version, so stale definitions migrate cleanly. The transform is identity — no stored global argument value changes.

Upgrade note: No action required. On the next method run, each existing definition's typeVersion advances to 2026.10.22.1 with its global arguments preserved.

2026.10.14.1

Added: The manifest now declares license: Apache-2.0 (SPDX). The registry quality rubric scores a declared license separately from the bundled LICENSE.md.

Upgrade note: Metadata only. No code, schema, or behavioral changes.

2026.09.18.1

Upgrade note: Normalized npm:zod dependency version to 4.6.5 across the repo. No behavioral changes in this extension.

03Behaviors1
@webframp/elasticache-datastore-bootstrap/provisionerv2026.10.22.1provisioner.ts
fn provision()
Create/verify an ElastiCache Serverless (Valkey) cache, security group, and IAM policy for @webframp/valkey-datastore.

Resources

state(infinite)— ElastiCache Serverless cache + security group + IAM policy provisioned for swamp.
04Workflows1
@webframp/bootstrap-elasticache-datastorec4a8f2e1-7d3b-4a6c-9e5f-1b2d3c4e5f6a

Provision an ElastiCache Serverless (Valkey) cache, security group, and IAM managed policy for @webframp/valkey-datastore, then switch the current repo to use Valkey. After completion the repo is configured. Verify with `swamp datastore status`.

infraCreate ElastiCache Serverless cache, security group, and IAM policy.
1.provisionswamp-valkey-provisioner.provision— Run the provisioner model. Instance `swamp-valkey-provisioner` must be pre-created with globalArguments wired to the workflow inputs.
configurePoint this repo's datastore at the new Valkey cache.
1.run-setupswamp-valkey-setup.execute— Run `swamp datastore setup extension @webframp/valkey-datastore`.
05Previous Versions12
2026.10.14.1Apache-2.0(was none)

2026.10.14.1

Added: The manifest now declares license: Apache-2.0 (SPDX). The registry quality rubric scores a declared license separately from the bundled LICENSE.md.

Upgrade note: Metadata only. No code, schema, or behavioral changes.

2026.09.18.1

Upgrade note: Normalized npm:zod dependency version to 4.6.5 across the repo. No behavioral changes in this extension.

2026.09.18.1

2026.09.18.1

Upgrade note: Normalized npm:zod dependency version to 4.6.5 across the repo. No behavioral changes in this extension.

2026.09.15.1

2026.09.15.1

Changed: Bump zod 4.4.3 → 4.6.5

2026.08.28.1

Changed: Normalized the extension license to Apache-2.0 and corrected the copyright holder to "Sean Escriva". Extensions that previously shipped an MIT LICENSE.md are now Apache-2.0, consistent with the repository root and every other extension. No code or behavioral changes.

Upgrade note: License text only. No API, schema, or runtime behavior changed.

2026.08.27.1

Changed: Test suite now builds its method context from the shared createModelTestContext factory in @systeminit/swamp-testing instead of a hand-rolled context, wrapping writeResource to preserve the existing assertion API. No behavioral, schema, or method changes — the published provisioner is unchanged. The deno.json gains a dev-only @systeminit/swamp-testing import-map entry and its check task now type-checks the test file.

2026.08.26.3

Fixed: Restored inline npm:zod@4.4.3 import specifiers so the registry quality scorer can resolve dependencies and score the extension. An earlier release used a bare "zod" import-map specifier, which published but scored as unscored.

Changed: Retained explicit compilerOptions.strict in deno.json. No behavioral or schema changes.

2026.08.28.1

2026.08.28.1

Changed: Normalized the extension license to Apache-2.0 and corrected the copyright holder to "Sean Escriva". Extensions that previously shipped an MIT LICENSE.md are now Apache-2.0, consistent with the repository root and every other extension. No code or behavioral changes.

Upgrade note: License text only. No API, schema, or runtime behavior changed.

2026.08.27.1

Changed: Test suite now builds its method context from the shared createModelTestContext factory in @systeminit/swamp-testing instead of a hand-rolled context, wrapping writeResource to preserve the existing assertion API. No behavioral, schema, or method changes — the published provisioner is unchanged. The deno.json gains a dev-only @systeminit/swamp-testing import-map entry and its check task now type-checks the test file.

2026.08.26.3

Fixed: Restored inline npm:zod@4.4.3 import specifiers so the registry quality scorer can resolve dependencies and score the extension. An earlier release used a bare "zod" import-map specifier, which published but scored as unscored.

Changed: Retained explicit compilerOptions.strict in deno.json. No behavioral or schema changes.

2026.08.27.1

2026.08.27.1

Changed: Test suite now builds its method context from the shared createModelTestContext factory in @systeminit/swamp-testing instead of a hand-rolled context, wrapping writeResource to preserve the existing assertion API. No behavioral, schema, or method changes — the published provisioner is unchanged. The deno.json gains a dev-only @systeminit/swamp-testing import-map entry and its check task now type-checks the test file.

2026.08.26.3

Fixed: Restored inline npm:zod@4.4.3 import specifiers so the registry quality scorer can resolve dependencies and score the extension. An earlier release used a bare "zod" import-map specifier, which published but scored as unscored.

Changed: Retained explicit compilerOptions.strict in deno.json. No behavioral or schema changes.

2026.08.26.3

2026.08.26.3

Fixed: Restored inline npm:zod@4.4.3 import specifiers so the registry quality scorer can resolve dependencies and score the extension. An earlier release used a bare "zod" import-map specifier, which published but scored as unscored.

Changed: Retained explicit compilerOptions.strict in deno.json. No behavioral or schema changes.

2026.08.26.1

2026.08.26.1

Changed: Normalized deno.json configuration for repo-wide consistency: added explicit compilerOptions.strict and migrated zod dependency to the import map (bare "zod" specifier instead of inline npm:zod@4.4.3). No behavioral changes — runtime resolution is identical.

2026.08.24.1

2026.08.24.1

Added: Output metadata attributes for observability.

  • durationMs: Method execution duration in milliseconds.
  • collectedBy: Extension name that produced the data.
  • fetchedAt: ISO 8601 timestamp when data was fetched (added to resources that previously lacked it).
2026.08.23.1

2026.08.23.1

Fixed: README's Development section referenced a nonexistent valkey-datastore-bootstrap directory; corrected to elasticache-datastore-bootstrap.

Changed: Documentation only — no code changes otherwise. Added a ## Troubleshooting section covering the multiple-default-VPC error, the create-failed/deleting/deleted terminal-state branches in waitForCacheAvailable, the self-healing ingress-rule check in ensureSecurityGroup that silently reopens port 6379 to the VPC CIDR on re-run, and divergent securityGroupId reporting when reusing a cache created with a different security group.

2026.08.02.1

2026.08.02.1

Fixed: The configure job in @webframp/bootstrap-elasticache-datastore failed with Invalid expression: No such key: attributes. The workflow queried data.latest("swamp-valkey-provisioner", "state"), but the provisioner writes its resource under the instance name "main" (via writeResource("state", "main", ...)) — data.latest()'s second argument matches the resource's instance name, not its spec name. The configure job now queries data.latest("swamp-valkey-provisioner", "main"), which resolves correctly.

Changed: The run-setup step now passes the provisioner's datastoreConfig through a DATASTORE_CONFIG environment variable instead of interpolating it directly into a single-quoted shell string. The prior pattern could allow a config value containing a single quote to break out of shell quoting.

Upgrade note: No action needed beyond swamp extension pull — the workflow file is re-pulled with the extension.

2026.07.27.1

2026.07.27.1

Fixed: The fmt task ran deno fmt --check, so deno task fmt verified formatting instead of applying it and there was no way to format the extension through its own task. fmt now formats and a new fmt:check verifies, matching every other extension in the repository.

Fixed: deno fmt no longer inspects CLAUDE.md / AGENTS.md. Those files are gitignored and never present in CI, but deno fmt does not read .gitignore, so deno task fmt:check could fail locally on a file CI does not have.

Upgrade note: Tooling and formatting only. No model, method, schema, or behavior change — nothing to do on upgrade.

2026.07.23.1

2026.07.23.1

Added: Initial release of @webframp/elasticache-datastore-bootstrap — one-shot provisioner for AWS ElastiCache Serverless (Valkey engine) targeting @webframp/valkey-datastore.

Creates an ElastiCache Serverless cache with TLS, a VPC security group (TCP/6379 from VPC CIDR), and a least-privilege IAM managed policy, then configures the swamp repo datastore via a two-job workflow.

Fixed:

  • Subnet IDs from user input are validated per-element against /^subnet-[a-f0-9]+$/ after split, preventing CLI argument injection
  • key_prefix constrained to max 64 chars and safe characters only ([a-zA-Z0-9_\-:.]) — prevents shell injection via workflow template
  • --policy-document values are redacted from AWS CLI error messages to avoid leaking ARNs and account IDs in logs
  • waitForCacheAvailable throws immediately when cache returns null (deleted mid-wait) or enters deleting/deleted terminal state
  • getDefaultVpcId throws if multiple default VPCs found, requiring explicit vpc_id
  • Idempotency path waits for cache availability when re-running against a cache in creating state, preventing broken endpoint URLs
  • describeServerlessCache only swallows ServerlessCacheNotFoundFault — other errors propagate correctly
  • ensureSecurityGroup verifies port 6379/tcp ingress on reused security groups and adds it if missing
  • getSubnetIds validates filtered subnet IDs are non-empty
  • security_group_name schema rejects commas to prevent tag argument injection
  • Empty cache ARN or endpoint address throws immediately instead of producing malformed output
06Stats
A
100 / 100
Downloads
31
Archive size
16.1 KB
  • 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
  • License2/2earned
  • Verified public repository2/2earned
07Platforms
08Labels