Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dynamo-to-elasticsearch

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dynamo-to-elasticsearch

Module to dump DynamoDB data to ElasticSearch indices.

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Dynamo-to-ElasticSearch

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

What this does

It takes entire table from DynamoDB and injects it to AWS Elasticsearch service. It may serve as a blueprint in AWS Lambda, however it is not based on streams, but on DynamoDB scan operation.

This module is an extended version of dynamodb-to-elasticsearch. The difference is that here you can set your own primaryKey as well as index type. It is a separate repository as it breaks backward compatibility.


Installation

$ npm install dynamo-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.
regionstringdynamodb table region
es_endpointstringelastic-search endpoint
es_dataobject
es_data.idstringThe name of primaryKey field for DynamoDB table. It should be unique identifier for documents. By default it is set to sortKey.
es_data.typestringName of class of objects, which document represents. By default it is set to datatype.
es_data.indiceNamestringIndex 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

Keywords

FAQs

Package last updated on 01 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc