dynamodb-touch
Simulated DynamoDB Stream events based on the contents of a DynamoDB table.
What it does
Performs either a GetItem, Query, or Scan operation on a DynamoDB table, then
passes each resulting record into a Kinesis stream in a wrapper identical to
what would be provided by a DynamoDB stream INSERT
event.
How to use it
You must provide your own configured Dyno and Kinesis clients. The Kinesis client must be pre-configured to provide the stream name with each request.
var touch = ;var AWS = ;var Dyno = ; var clients = dyno: kinesis: region: 'us-east-1' params: StreamName: 'my-kinesis-stream' ; // send one event for a dynamodb record with the provided keytouch; // query dynmodb, sending events for each resulttouch; // scan every record in dynamodb, sending events for each resulttouch; // send one event for a feature that has already been fetchedvar item = id: 'record-id' data: 'record-data' ;touch;
What events in Kinesis will look like
A Kinesis event will contain a Data
property. For dynamodb-touch events, this
will be a base64-encoded JSON string which mimics a DynamoDB Stream event.
kinesis;
... will console.log: