dynamodb-snapshot-store
This package provides a simple snapshot store implementation on top of Amazon DynamoDB. This is meant to be a general purpose package, and makes no assumptions about the structure or type of your states. The states are serialized to JSON when stored, and deserialized automatically when fetching. For a few examples, view the samples below:
var SnapshotStore = ;var snapshotStore =region: 'us-east-1'accessKeyId: 'access-key-id'secretAccessKey: 'secret-access-key'tableName: 'snapshots';
snapshotStore.store(snapshot)
An atomic write of a snapshot to the store.
var snapshot =snapshotId: '00000000-0000-0000-0000-000000000000'state:foo: 'bar';snapshotStore;});
snapshotStore.fetch(options)
Fetches the aggregate state from the snapshot store.
var options =snapshotId: '00000000-0000-0000-0000-000000000000';snapshotStore;