# http-aws-es

> Use the elasticsearch-js client with Amazon ES

Latest version **6.0.0** (published 2018-05-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install http-aws-es
pnpm add http-aws-es
yarn add http-aws-es
bun add http-aws-es
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 6.0.0 |
| Published | 2018-05-19 |
| First published | 2015-10-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/http-aws-es) |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 15.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 260 |
| Author | Geoff Wagstaff |
| Maintainers | thedeveloper |
| Keywords | elasticsearch, elasticsearch-js, aws-es, aws, amazon, es, http, connector, extension, sign |

## Links

- npm: https://www.npmjs.com/package/http-aws-es
- Repository: https://github.com/TheDeveloper/http-aws-es
- Homepage: https://github.com/TheDeveloper/http-aws-es#readme
- Issues: https://github.com/TheDeveloper/http-aws-es/issues
- npm.io page: https://npm.io/package/http-aws-es

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 6.0.0 (latest) — 2018-05-19
- 4.0.0 — 2017-11-25
- 3.1.3 — 2017-10-22
- 3.1.1 — 2017-10-21
- 3.1.0 — 2017-08-25
- 3.0.0 — 2017-08-25
- 2.0.5 — 2017-07-30
- 2.0.4 — 2017-07-12
- 2.0.3 — 2017-06-20
- 2.0.1 — 2017-06-20
- 2.0.0 — 2017-06-20
- 1.1.3 — 2015-12-01
- 1.1.2 — 2015-10-27
- 1.1.1 — 2015-10-19
- 1.1.0 — 2015-10-19
- … 3 more at https://npm.io/package/http-aws-es/versions

## README

# Connection handler for Amazon ES [<img title="Version" src="https://img.shields.io/npm/v/http-aws-es.svg?style=flat-square" />](https://www.npmjs.org/package/http-aws-es)
Makes [elasticsearch-js](https://github.com/elastic/elasticsearch-js) compatible with Amazon ES. It uses the aws-sdk to make signed requests to an Amazon ES endpoint.

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

## Usage
```javascript
// 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:

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

## Options
```javascript
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
```bash
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
```

---
_Source: https://npm.io/package/http-aws-es · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
