Skip to content

trmaphi/aws-elasticsearch-client

Repository files navigation

AWS ElasticSearch Service Client

Reuse the established elasticsearch-js client with AWS signature v4. Built-in support for Typescript.

Getting Started

npm i @trmaphi/aws-elasticsearch-service-client @elastic/elasticsearch aws-sdk

Usage

const AWS = require('aws-sdk');
const { AWSElasticSearchClient } = require('@trmaphi/aws-elasticsearch-service-client');

AWS.config.update({
    credentials: new AWS.SharedIniFileCredentials({ profile: 'YOUR LOCAL AWS PROFILE'}),
    region: 'AWS REGION',
})

const client = new AWSElasticSearchClient({
    node: 'URL to AWS ElasticSearch Node',
});

client.search({
    index: 'Any index name',
    body: { query: { match_all: {} } }
})
    .then(res => console.log(res.body.hits.hits))
    .catch(err => console.error(err));

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Truong Ma Phi - Initial work - trmaphi

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Unofficial AWS ElasticSearch Service client for Node.js

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published