Skip to content

happyscribe/dynamodb-stream-stitch-connector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dynamodb-stream-stitch-connector

A utility to push dynamodb streams to Stitch. Runs on AWS Lambda

How

AWS Lambda function

//handler.js

const stitchConnector = require('dynamodb-stream-stitch-connector')

const connector = stitchConnector.init({
  apiKey: 'xxxxxxxxxx',
  clientId: 12345,
  tableName: 'stitch-table-name',
  keyNames: [ 'id', 'anotherKey' ]
})

module.exports.streamsToStitch = async ({
  Records
}) => {
  for (const record of Records) {
    await connector.processRecord(record)
  }
}

If you're using Serverless Framework

## serverless.yml

# ....
functions:
  streamsToStitch:
    handler: handler.streamsToStitch
    events:
      - stream:
          type: dynamodb
          arn:
            Fn::GetAtt: [SomeTable, StreamArn]
# ....

About

A utility to push dynamodb streams to Stitch. Runs on AWS Lambda

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published