AWS Elasticsearch returns No living Connection

686 views Asked by At

Helo Everyone, Im using AWS-Elasticsearch service and access it using Lambda. The When I try to connect elasticsearch from Lambda It throws an error

{ Error: No Living connections
    at sendReqWithConnection (/var/task/node_modules/elasticsearch/src/lib/transport.js:226:15)
    at next (/var/task/node_modules/elasticsearch/src/lib/connection_pool.js:214:7)
    at /var/task/node_modules/async-listener/glue.js:188:31
    at process._tickCallback (internal/process/next_tick.js:61:11)
  message: 'No Living connections',
  body: undefined,
  status: undefined }

I'm using Nodejsto connect es domain

const elasticsearch = require('elasticsearch');
const httpAwsEs = require('http-aws-es');
const AWS = require('aws-sdk');

const esClient = new elasticsearch.Client({
  host: 'endpointAddress',
  connectionClass: httpAwsEs,
  httpAuth: 'userName:Passwod',
  amazonES: {
    region: 'us-east-1',
    credentials: new AWS.EnvironmentCredentials('AWS')
  }
});

module.exports = esClient;

I've tested with on another account which was working fine, What would be the issue, Thanks for Reading.

0

There are 0 answers