@pharmaspectra/dynamodb-stream-elasticsearch
Version:
Missing blueprint for AWS Lambda. Reads stream from AWS DynamoDB and writes it to AWS ElasticSearch.
19 lines (15 loc) • 614 B
TypeScript
import { ClientOptions } from "@opensearch-project/opensearch";
import { RecordList, Record, AttributeMap } from "aws-sdk/clients/dynamodbstreams";
export function pushStream(opts: streamOptions): Promise<void>
export type transformFunction = (body?: { [key: string]: any }, oldBody?: AttributeMap, record?: Record) => Promise<any> | any
export interface streamOptions {
event: RecordList,
index?: string,
type?: string,
endpoint: string,
refresh?: boolean,
testMode?: boolean,
transformFunction?: transformFunction,
elasticSearchOptions?: ClientOptions,
useBulk?: boolean
}