6.0.0 • Published 6 years ago

http-aws-es v6.0.0

Weekly downloads
65,265
License
MIT
Repository
github
Last release
6 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-1870@gdksoftware/elasticsearchwizdalvinyl-elasticsearchtaggable-searchertiendvd-logagenttpdalworkstreams-task-indexerexperiment7dynamodb-stream-to-es-lambda-adapterghost-service-loaderelaselastic-searchelastic-general-providerelastic-lucid-providerelastic-migrateelastic-reindexelasticulize-clielasticsearch-playstoreelasticsearch-reindexelasticsearch-backupelasticsearch-clietl-cli@rhbecker/client-aws-elasticsearch-serviceinnobot-chat-apihippodamusdynamo-to-elasticsearchdynamodb-to-elasticsearch@janiscommerce/elasticsearches-simple@proak/dynamodb-stream-elasticsearchhoodie-plugin-scampi-nlp@smartsoftware/dexterity@sematext/logagent@sanbornagency/nodebb-theme-quest@sat-utils/api-lib@staart/manager@foundry-ai/foundry-service-loaderaws-component-inventoryaws-es-credentialsaws-elasticsearch-clientaws-elasticsearch-helperaws-elasticsearch-modelawses-curatoraws-log-shipperaws-loopback-connector-es@financial-times/n-es-toolslambda-stashlambda-taggable-elasticsearch-indexerlogar-curator-aws-esnodebb-theme-quest@cumulus-ce/api@cumulus-test/daac-ops-apimusdate-core@claudineijrdev/my_commons_librarybrcap-awsbrcap-aws-teste@cheftonic/dynamodb-to-elasticsearch-offlinebwcorenewsource-elastic-module@borsawy/types@xapp/stentor-service-searchmigration-pipeline@zalastax/nolb-http-aownit-api-commonpro-akpunchcardpino-elasticsearch-awscox-connector-elasticsearchonebyte_utilspts-awsdlcoreserverless-elasticsearch-clientsat-api-libspcorestaart-managerstreaming-api
6.0.0

6 years ago

4.0.0

6 years ago

3.1.3

7 years ago

3.1.1

7 years ago

3.1.0

7 years ago

3.0.0

7 years ago

2.0.6

7 years ago

2.0.5

7 years ago

2.0.4

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.1.3

8 years ago

1.1.2

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago