Communicate with AWS Elasticsearch or Open Search.
Other solutions for communicating with Elasticsearch are either incompatible with AWS, very heavy weight, or both. This client gets the job done and is as simple as it gets!
- Simple Promise or async syntax
- Authenticates to AWS via AWS Signature v4
- Light-weight
Use it with Elasticsearch's Document API.
ElasticsearchClient
depends on two other utilities to work:
npm install @sailplane/elasticsearch-client @sailplane/aws-https @sailplane/logger
API Documentation on jsDocs.io
Simple example:
function get(id: string): Promise<Ticket> {
return this.es
.request("GET", "/ticket/local/" + id)
.then((esDoc: ElasticsearchResult) => esDoc._source as Ticket);
}
See examples for a comprehensive example.