dte

dynamodb-to-elasticsearch

NPM module to dump DynamoDB data to ElasticSearch indices.

Showing:

Popularity

Downloads/wk

3

GitHub Stars

23

Maintenance

Last Commit

3yrs ago

Contributors

0

Package

Dependencies

5

Size (min+gzip)

452.2KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

DynamoDB-to-ElasticSearch

A NPM module that will dump all DynamoDB data to AWS ElasticSearch indices.

What this does

There's no blueprint in AWS Lambda that allows to dump DynamoDB data into ElasticSearch. This module will facilitate exactly that.


Installation

$ npm install dynamodb-to-elasticsearch

Guide to configure AWS to use this blueprint

Documentation

module.exec (table, region, es_endpoint, es_data = { id: 'sortKey', type: 'datatype', indiceName: ''})

ParameterTypeDescription
tablestringTable name of dynamoDB whose data you want to dump in elastic-search.
indiceNamestringindice name of elastic-search on which you can perform query.
regionstringdynamodb table region
es_endpointstringelastic-search endpoint
es_dataobject
es_data.idobjectThe name of primaryKey field for DynamoDB table. It should be unique identifier for documents. By default it is set to sortKey.
es_data.typeobjectName of class of objects, which document represents. By default it is set to datatype.
es_data.indiceNameobjectIndex name of elastic-search on which you can perform query.

Example

const d2es = require('dynamodb-to-elasticsearch');

const table = 'table',
    region = 'region',
    es_endpoint = 'es_endpoint_value',
    es_data = { id: 'sortKey', type: 'data', indiceName: 'candidates' }};

exports.handler = function(event, context, callback) {
    d2es.exec(table, region, es_endpoint, es_data, (err, success) => {
        if (err) {
            callback(err, null);
        } else {
            callback(null, success);
        }
    });
}

License

MIT

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100