@anyhook/aws
v0.2.1
Published
AWS adapter for anyhook: SQS transport + single-table DynamoDB state + due_at-GSI scheduler with a fixed-interval sweeper
Maintainers
Readme
@anyhook/aws
AWS adapter for anyhook: run the outbound webhook engine on Lambda with no server to operate.
- Transport:
@anyq/sqsover SQS (Lambda event-source consumer with partial-batch failures). - State: a single DynamoDB table (
PK = TENANT#<tenant>), conditional writes for circuit + idempotency. - Scheduler (D2): retries ≤900s use native SQS
DelaySeconds; longer retries persist adue_atrow discovered by a fixed-interval sweeper that lease-claims each row before enqueue (crash-safe, at-least-once). DynamoDB TTL is GC-only.
Install
npm i @anyhook/core @anyhook/awsOverview
Provides createAdapter(config) / buildEngine(config) and Lambda handler factories:
import { createIngestHandler, createDeliverHandler, createSweeperHandler } from '@anyhook/aws';
export const ingest = createIngestHandler(config); // API Gateway → portal + send()
export const deliver = createDeliverHandler(config); // SQS event → engine.processMessage
export const sweep = createSweeperHandler(config); // scheduled (~60s) → re-enqueue due retriesPoint config at your DynamoDB table (with a due_at GSI) and SQS queue. Mount the portal behind your own auth (see the root docs/composition-auth.md). MIT.
