AWS Adapters
Overview
The reventless-aws package provides AWS-specific implementations of the adapter interfaces defined in the core reventless framework. Adapters bridge the gap between Reventless's provider-agnostic components and AWS infrastructure services.
Reventless components are designed to be cloud-provider-agnostic. The reventless package defines abstract adapter interfaces, while reventless-aws implements these interfaces using AWS services like DynamoDB, SQS, SNS, S3, and Lambda.
AWS Service Mappings
Reventless components map to AWS services as follows:
| Component | AWS Service | Purpose |
|---|---|---|
| EventLog | DynamoDB | Append-only event storage with partition key id and sort key sequenceNr |
| CommandTopic | SQS FIFO | Command message queues with FIFO ordering and deduplication |
| EventTopic | SNS / SNS FIFO | Event publishing with fan-out to multiple subscribers |
| QueryDb | DynamoDB | Read model storage with configurable indexes and TTL |
| EventCollector | DynamoDB Streams / SQS | Consumes events from EventLog or EventTopic |
| Task | S3 | Stores task data; S3 events trigger Lambda on object create/delete |
| CommandGenerator | AppSync | GraphQL API for command generation with DynamoDB resolvers |
| Counter | DynamoDB Streams | Atomic counter updates triggered by DynamoDB stream events |
| ScheduledPublisher | CloudWatch Events | Time-based event publishing using CloudWatch Events rules |
| Heartbeat | CloudWatch Events | Periodic heartbeat signals using CloudWatch Events |
| Runtime | Lambda | Execution environment for all runtime operations |
Adapter Details
The following AWS adapters are available. For how adapters are structured internally (deploy-time vs runtime, the make pattern, Pulumi.Output.t), see AWS Architecture.
Core Event Sourcing Adapters
- EventLog → DynamoDB - Append-only event storage with efficient replay
- DcbEventLog → DynamoDB - Tag-routed shared event store for DCB slices with per-tag consistency fences
- CommandTopic → SQS FIFO - Reliable command delivery with strict ordering
- EventTopic → SNS - Event publishing with fan-out to multiple subscribers
- EventCollector → SQS FIFO - Multi-source event collection from SNS and DynamoDB Streams
Data Storage Adapters
- QueryDb → DynamoDB - Read model storage with GSI support and AppSync integration
- Task → S3 - File-based task triggering with Lambda subscriptions
Supporting Adapters
- ScheduledPublisher → CloudWatch Events - Scheduled command execution
- Heartbeat → CloudWatch Events - Health check and keep-alive monitoring
- Counter → DynamoDB Streams - Atomic counting via change data capture
- StateTopic → DynamoDB Streams - State change publishing via DynamoDB Streams
- CommandGenerator → AppSync - GraphQL mutation resolvers for command generation
- QueryEngine → DynamoDB - Advanced query and scan operations
Folder Structure
reventless-aws/src/adapter/
├── AWS.res # AWS service constants and principals
├── AWS_Tags.res # Tagging utilities
├── Adapter_Helpers.res # Shared adapter utilities
├── Cloner/ # Fargate-based data cloning
├── CommandGenerator/ # AppSync resolvers for commands
├── CommandTopic/ # SQS-based command channels
├── Counter/ # DynamoDB Stream counter handlers
├── EventCollector/ # DynamoDB Stream / SQS event collection
├── EventLog/ # DynamoDB event storage
├── EventTopic/ # SNS event publishing
├── Heartbeat/ # CloudWatch Events heartbeat
├── QueryDb/ # DynamoDB read model storage
├── QueryEngine/ # DynamoDB query execution
├── Runtime/ # Lambda runtime environment
├── ScheduledPublisher/ # CloudWatch Events scheduled publishing
├── StateTopic/ # DynamoDB Stream state publishing
└── Task/ # S3 task buckets