how to set http-aws-es in new version elasticsearch js?
See original GitHub issue💬 Questions and Help
Hi, I try to update elasticsearch from "elasticsearch": "^15.1.1"
to "@elastic/elasticsearch": "^7.0.0-rc.1"
Here is my change for init Client
const esClient = new Client({ nodes: [ ‘someNode’ ], ConnectionPool: require(‘http-aws-es’) })
When I query the es endpoint. I got the error as below:
TypeError: Invalid host
at HttpAmazonESConnector.ConnectionAbstract (/myLocalFolder/node_modules/elasticsearch/src/lib/connection.js:27:11)
at HttpAmazonESConnector.HttpConnector (/myLocalFolder/node_modules/elasticsearch/src/lib/connectors/http.js:32:22)
at HttpAmazonESConnector (/myLocalFolder/node_modules/http-aws-es/connector.js:20:5)
at ConnectionPool.addConnection (/myLocalFolder/node_modules/@elastic/elasticsearch/lib/ConnectionPool.js:230:24)
at opts.forEach.o (/myLocalFolder/node_modules/@elastic/elasticsearch/lib/ConnectionPool.js:211:30)
at Array.forEach (native)
at ConnectionPool.addConnection (/myLocalFolder/node_modules/@elastic/elasticsearch/lib/ConnectionPool.js:211:12)
at Client (/myLocalFolder/node_modules/@elastic/elasticsearch/index.js:104:27)
is there anything missing for my change?
Please note that this issue tracker is not a help forum and this issue may be closed.
It’s not uncommon that somebody already opened an issue or in the best case it’s already fixed but not merged. That’s the reason why you should search at first before submitting a new one.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Update | Elasticsearch JavaScript Client [8.5] | Elastic
The update API allows updates of a specific document using the given script. ... Client } = require('@elastic/elasticsearch') const client = new Client({ ......
Read more >node.js - How to connect to AWS ElasticSearch using npm ...
I was able to solve this by specifying the region. There is a problem with the elasticsearch client where it's not able to...
Read more >Http-aws-es NPM - npm.io
Connection handler for Amazon ES. Makes elasticsearch-js compatible with Amazon ES. It uses the aws-sdk to make signed requests to an Amazon ES...
Read more >aws-es - Npms.io
A tiny Amazon Signature Version 4 connection class for ... Use the elasticsearch-js client with Amazon ES (Updated for elasticsearch 16.7.2).
Read more >ElasticSearch - npm - Socket.dev
The official low-level Elasticsearch client for Node.js and the browser. ... A tiny Amazon Signature Version 4 connection class for @elastic/elasticsearch, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We’ve released an NPM package that works with @elastic/eleasticsearch and AWS elasticsearch clusters. It signs the requests for AWS and refreshes the credentials when they’re about to expire.
https://www.npmjs.com/package/@acuris/aws-es-connection https://github.com/mergermarket/acuris-aws-es-connection
To anyone looking for the updated version, here is a sample gist[0] that fit our requirements. I’ll look into submitting a PR/publishing a new package when I get a bit of time.
[0] https://gist.github.com/parthdesai93/1bd3a25ad4cf788d49ce4a00a1bb3268