# signed-aws-es-fetch

> ## Install

Latest version **1.6.0** (published 2018-09-05) · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install signed-aws-es-fetch
pnpm add signed-aws-es-fetch
yarn add signed-aws-es-fetch
bun add signed-aws-es-fetch
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.6.0 |
| Published | 2018-09-05 |
| First published | 2015-10-08 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 3.9 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | aendrew, bobhaslett, briggsc, callumlocke, ft-internal-products, i-like-robots, jakedchampion, joannaskao, mattandrews, quarterto, robinmarr-ft, rowanmanning, sdbernard, the-ft, zhenyulin |

## Links

- npm: https://www.npmjs.com/package/signed-aws-es-fetch
- npm.io page: https://npm.io/package/signed-aws-es-fetch

## Dependencies (3)

- [aws4](https://npm.io/package/aws4.md) ^1.1.0
- [denodeify](https://npm.io/package/denodeify.md) ^1.2.1
- [node-fetch](https://npm.io/package/node-fetch.md) ^1.3.3

## Recent versions

- 1.6.0 (latest) — 2018-09-05
- 1.5.0 — 2018-09-03
- 1.4.0 — 2017-05-09
- 1.3.0 — 2016-04-18
- 1.2.0 — 2016-04-18
- 1.1.0 — 2015-10-20
- 1.0.3 — 2015-10-16
- 1.0.2 — 2015-10-13
- 1.0.1 — 2015-10-13
- 1.0.0 — 2015-10-08

## README

# signed-aws-es-fetch

## Install

```
npm install signed-aws-es-fetch
```

## Usage

For credentials either:-

- Specify them in the following format as the third argument to signedFetch:-

```js
signedFetch(url, opts, { accessKeyId: ???, secretAccessKey: ??? });
```

- Or, set `ES_AWS_ACCESS_KEY` and `ES_AWS_SECRET_ACCESS_KEY` environment variables, or
- Set `AWS_ACCESS_KEY` and `AWS_SECRET_ACCESS_KEY` environment variables, or
- Set the `ES_AWS_SESSION_TOKEN` or `AWS_SESSION_TOKEN` environment variables. If you don't want this to be automatically picked up (for example in a Lambda where the `AWS_SESSION_TOKEN` may reflect an assumed role), set `ES_AWS_SESSION_TOKEN` to `false` to disable this.

```js
const signedFetch = require('signed-aws-es-fetch');

signedFetch(`https://${HOSTNAME_OF_ELASTIC_CLUSTER}/${INDEX}/_search`, {
		method: 'POST',
		body: JSON.stringify(…)
	})
	.then(function(response) {
		return response.json();
	});
```

To disable DNS resolution for domains outside of es.amazonaws.com you can use the `AWS_SIGNED_FETCH_DISABLE_DNS_RESOLUTION` environment variable.

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