Report first
Count encrypted and expired bytes before changing anything. Reports inspect the configured storage prefix.
retentionReport()Overflow control for JSON events
Spill explicitly allowed fields into encrypted S3-compatible storage. Leave a signed, readable stub your operators can restore in two clicks.
Local test bench / no uploads
Keys and encrypted objects live only in memory and disappear on refresh.
Run the sample event. The allowed oversized field will become a signed stub.
One narrow job
Exact JSON pointers are checked. Unlisted fields—even large ones—never leave the event.
AES-GCM protects the value before an S3 or MinIO write. A failed write rolls the event back.
The signed stub records size, digest, field, safe preview, expiry, and retrieval URL.
API / v0.1.0
Choose the fields, inline limit, object store, and retention window. Spillway handles encryption, signatures, atomic writes, and safe previews.
npm install event-payload-spillwayconst spillway = new Spillway({
allowlist: ["/result/attachment"],
maxInlineBytes: 32_000,
store: new S3CompatibleStore(s3),
encryptionKey,
signingKey,
expiresInMs: 604_800_000,
});const handle = createSpillwayProxy({
spillway,
upstream: "http://automation:3000/events",
verifyWebhook: ({ rawBody, headers }) =>
verify(rawBody, headers),
});Operational contract
Count encrypted and expired bytes before changing anything. Reports inspect the configured storage prefix.
retentionReport()Reclaim defaults to expired-only. Preview candidate count and size before deleting objects.
reclaim({ dryRun: true })Objects marked with a legal hold are excluded. Bucket lifecycle policy remains your final backstop.
spill(data, { legalHold: true })Protect the hot path