6.0.0 • Published 7 years ago

http-aws-es v6.0.0

Weekly downloads
65,265
License
MIT
Repository
github
Last release
7 years ago

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 endpoint.

Installation

# Install the connector, elasticsearch client and aws-sdk
npm install --save http-aws-es aws-sdk elasticsearch

Usage

// create an elasticsearch client for your Amazon ES
let es = require('elasticsearch').Client({
  hosts: [ 'https://amazon-es-host.us-east-1.es.amazonaws.com' ],
  connectionClass: require('http-aws-es')
});

Region + Credentials

The connector uses aws-sdk's default behaviour to obtain region + credentials from your environment. If you would like to set these manually, you can set them on aws-sdk:

let AWS = require('aws-sdk');
AWS.config.update({
  credentials: new AWS.Credentials(accessKeyId, secretAccessKey),
  region: 'us-east-1'
});

Options

let options = {
  hosts: [], // array of amazon es hosts (required)
  connectionClass: require('http-aws-es'), // use this connector (required)
  awsConfig: new AWS.Config({ region }), // set an aws config e.g. for multiple clients to different regions
  httpOptions: {} // set httpOptions on aws-sdk's request. default to aws-sdk's config.httpOptions
};
let es = require('elasticsearch').Client(options);

Test

npm test
# test against a real endpoint
AWS_PROFILE=your-profile npm run integration-test -- --endpoint https://amazon-es-host.us-east-1.es.amazonaws.com --region us-east-1
console_data_apiconsole_authorization_apisearch-ivory@dsco/layer-elasticsearches-clean-old-indiciesthinkclear-common-utilwzdalbs_web_doc_indexer_v2livecore-apiweb-hook-test-lambdaserverless-es-loggerthebackend_authorization_apithebackend_game_auth_apithebackend_game_data_api@everything-registry/sub-chunk-1870elastic-searchtaggable-searcherwizdalworkstreams-task-indexerstaart-managerspcore@cumulus-ce/api@cumulus-test/daac-ops-apistreaming-apitpdaltiendvd-logagent@claudineijrdev/my_commons_library@cheftonic/dynamodb-to-elasticsearch-offline@borsawy/typesvinyl-elasticsearch@financial-times/n-es-tools@foundry-ai/foundry-service-loader@gdksoftware/elasticsearch@janiscommerce/elasticsearch@proak/dynamodb-stream-elasticsearch@sanbornagency/nodebb-theme-quest@sat-utils/api-lib@smartsoftware/dexterity@sematext/logagent@staart/manager@rhbecker/client-aws-elasticsearch-servicemusdate-coremigration-pipelineownit-api-commononebyte_utilssat-api-libserverless-elasticsearch-clientnewsource-elastic-modulenodebb-theme-questpino-elasticsearch-awspro-akpunchcardpts-awsghost-service-loaderhoodie-plugin-scampi-nlphippodamusinnobot-chat-apilogar-curator-aws-eslambda-taggable-elasticsearch-indexerlambda-stash@xapp/stentor-service-search@zalastax/nolb-http-aaws-component-inventoryaws-elasticsearch-helperaws-es-credentialsaws-elasticsearch-clientaws-elasticsearch-modelaws-log-shipperaws-loopback-connector-escox-connector-elasticsearchawses-curatorbwcorebrcap-awsbrcap-aws-testedlcoredynamo-to-elasticsearchdynamodb-stream-to-es-lambda-adapterdynamodb-to-elasticsearchelastic-lucid-providerelastic-migrateelastic-reindexelasticsearch-reindexelasticulize-clielasticsearch-playstoreelasticsearch-backupelasticsearch-clies-simpleelaselastic-general-providerexperiment7
6.0.0

7 years ago

4.0.0

8 years ago

3.1.3

8 years ago

3.1.1

8 years ago

3.1.0

8 years ago

3.0.0

8 years ago

2.0.6

8 years ago

2.0.5

8 years ago

2.0.4

8 years ago

2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.1.3

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago