@scavasoft/aws-cdk-dynamodb-to-elasticsearch-stream
TypeScript icon, indicating that this package has built-in type declarations

0.0.16 • Public • Published

Stream DynamoDB to ElasticSearch

npm version

AWS CDK based construct that enables you to easily stream data from a DynamoDB table to an ElasticSearch index.

Installation

npm install @scavasoft/aws-cdk-dynamodb-to-elasticsearch-stream

Sample usage

Use the construct as a "drop-in" replacement of the dynamodb.Table construct.

Before:

import * as dynamodb from '@aws-cdk/aws-dynamodb';

new dynamodb.Table(this, 'table', {
    partitionKey: {
        name: "id",
        type: AttributeType.STRING,
    },
});

After:

import * as elasticsearch from '@aws-cdk/aws-elasticsearch';

new DynamoDBWithElasticSearchStream(this, 'table', {
    partitionKey: {
        name: "id",
        type: AttributeType.STRING,
    },
    streamTo: {
        domain: new elasticsearch.Domain(this, 'elasticsearch', {
            version: ElasticsearchVersion.V7_7,
        }),
        index: "some-elasticsearch-index",
    }
});

A more in-depth example is available in the /examples subfolder.

Package Sidebar

Install

npm i @scavasoft/aws-cdk-dynamodb-to-elasticsearch-stream

Weekly Downloads

6

Version

0.0.16

License

ISC

Unpacked Size

25.3 kB

Total Files

8

Last publish

Collaborators

  • scavasoft_owner
  • dzhuneyt