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
Does this module work from within the browser? I don't have a NodeJS app and I'm trying to execute this script from within the browser. I'm using Browserify to require and bundle the necessary modules.
var AWS = require('aws-sdk');
var creds = new AWS.Credentials('AKID','Security');
var es = require('elasticsearch').Client({
host: 'https://hostname.us-east-1.es.amazonaws.com/',
connectionClass: require('http-aws-es'),
amazonES: {
region: 'us-east-1',
credentials: creds
}
});
es.cluster.health({},function(err,resp,status) {
console.log("-- Client Health --",resp);
});
I get the following error in the console:
AWS Credentials error: No credentials to load
Is it possible to adapt this awesome module to work from within the browser?
The text was updated successfully, but these errors were encountered:
This should work fine in the browser. That config you're using there is for an older version of this module. Perhaps try upgrading and taking a look at the readme for configuring the latest version?
Actually, I take that back. This probably won't play nice with browsers at the moment because the connector tries to use AWS.NodeHTTPClient which will not be available in a browserified aws-sdk.
It should be possible to add in support for running in browsers. We would need to use the AWS.XHRClient instead.
This might be more of a request than an issue.
Does this module work from within the browser? I don't have a NodeJS app and I'm trying to execute this script from within the browser. I'm using Browserify to require and bundle the necessary modules.
I get the following error in the console:
AWS Credentials error: No credentials to load
Is it possible to adapt this awesome module to work from within the browser?
The text was updated successfully, but these errors were encountered: