You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I prefer to use a singleton connection for connecting to elastic search - We use an IAM role rather than IAM user for security reasons.
I'm receiving a 403 error after the session token expires - Does this library interact with aws-sdk to refresh tokens ? (or) is this something that should be handled outside of this library ?
var AWS = require('aws-sdk');
var config = require('config');
var connectionClass = require('http-aws-es');
var elasticsearch = require('elasticsearch');
AWS.config.getCredentials(function() {
AWS.config.update({
credentials: new AWS.Credentials(AWS.config.credentials.accessKeyId,AWS.config.credentials.secretAccessKey,AWS.config.credentials.sessionToken),
region: 'us-east-1'
});
}
)
var client = new elasticsearch.Client({
host: `${config.get('elasticSearch.host')}`,
log: 'debug',
connectionClass: connectionClass,
amazonES: {
credentials: new AWS.EnvironmentCredentials('AWS')
}
});
module.exports = client;
The text was updated successfully, but these errors were encountered:
Hi,
I prefer to use a singleton connection for connecting to elastic search - We use an IAM role rather than IAM user for security reasons.
I'm receiving a 403 error after the session token expires - Does this library interact with aws-sdk to refresh tokens ? (or) is this something that should be handled outside of this library ?
var AWS = require('aws-sdk');
var config = require('config');
var connectionClass = require('http-aws-es');
var elasticsearch = require('elasticsearch');
AWS.config.getCredentials(function() {
}
)
module.exports = client;
The text was updated successfully, but these errors were encountered: