Skip to content

Commit

Permalink
include ability to sign requests for AWS
Browse files Browse the repository at this point in the history
  • Loading branch information
dtomasi authored and Dominik Tomasi committed Oct 12, 2016
1 parent 9e75694 commit 35c2d84
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/esConnector.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ ESConnector.prototype.getClientConfig = function () {
log: this.settings.log || 'error',
suggestCompression: true
};

if (this.settings.amazonES) {
config.connectionClass = require('http-aws-es');
config.amazonES = this.settings.amazonES || {
region: 'us-east-1',
accessKey: 'AKID',
secretKey: 'secret'
}
}

if (this.settings.ssl) {
config.ssl = {
ca: (this.settings.ssl.ca) ? fs.readFileSync(path.join(__dirname, this.settings.ssl.ca)) : fs.readFileSync(path.join(__dirname, '..', 'cacert.pem')),
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"debug": "^2.1.3",
"elastic-deletebyquery": "1.0.7",
"elasticsearch": "^11.0.1",
"http-aws-es": "^1.1.3",
"lodash": "^3.5.0",
"loopback-connector": "^1.1.1"
},
Expand Down

0 comments on commit 35c2d84

Please sign in to comment.