0.1.2 • Published 3 years ago

node-red-contrib-aws-qldb v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

AWS Quantum DB Ledger Nodes for Node-Red

This was forked from Node-RED Node TypeScript Starter

AWS QLDB nodes for node-red. Currently only insert-rows is implemented as a proof-of-concept.

Example Use Cases

  • Write only insertions to AWS QLDB (audit logs, metadata hashing, etc.)

Using (with node-red)

Install via CLI (or use the pallette manager and search for node-red-contrib-aws-qldb)

npm i node-red-contrib-aws-qldb

Inputs / Outputs

Insert Node

The insert node will take whatever is on msg.payload and attempt to insert it into the AWS QLDB you have defined. It will accept a plain object or an array of objects.

It will return a list of document IDs if successful.

Getting Started

Everything has been tested with node version: v12.18.3

# Install dependencies
npm i
# Might need typescript, maybe
npm i -g tsc typescript

# Run and test
# NOTE: The test involves live data (for now)
#    YOu need to export the following properties
export AWS_ACCESS_KEY_ID="...."
export AWS_SECRET_ACCESS_KEY=="...."
export AWS_REGION="us-east-1"
export AWS_LEDGER="your-ledger-name"
export AWS_TABLE="your-table-name"
npm run dev

Building Node Set

Create a production build:

npm run build

Reference it in your node-red:

# From node-red local directory:
npm i /path/to/this/repo

Local packaging

# Bundle it up
npm run build && npm pack
# -> produces artifact like: node-red-contrib-aws-qldb-0.1.0.tgz

# Copy to node red directory
cp node-red-contrib-aws-qldb-0.1.0.tgz /path/to/node-red/local
cd /path/to/node-red/local
# Install bundle
npm i node-red-contrib-aws-qldb-0.1.0.tgz

TODO

  • Use mocks in tests
  • Uplevel configuration (or reuse regular aws one if possible)
  • Add more nodes
    • Select
    • Update
    • Delete

Submitting Changes

Create a pull request.

License

MIT © AJ Newton (see ./LICENSE)

Forked Project License

MIT © Alex Kaul (see ./LICENSE.node-red-typescript-starter)