# amazon-dax-client

> Amazon DAX Client for JavaScript

Latest version **1.2.10** (published 2025-07-21) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install amazon-dax-client
pnpm add amazon-dax-client
yarn add amazon-dax-client
bun add amazon-dax-client
```

## Health

**Score 33/100 (F)** — status: maintenance-mode.

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

Warnings: low downloads; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.10 |
| Published | 2025-07-21 |
| First published | 2017-10-20 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | separate (@types/amazon-dax-client) |
| Module format | CommonJS |
| Node | >= 4.8.0 |
| Dependencies | 5 |
| Unpacked size | 475.1 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| Author | Amazon Web Services |
| Maintainers | jiaqihu, kerent, tanushree.j, nosovsky, amzn-oss, ammodgil, pooniapr |
| Keywords | aws, dax, dynamodb, cache, amazon |

## Links

- npm: https://www.npmjs.com/package/amazon-dax-client
- Homepage: https://aws.amazon.com/dynamodb/dax/
- npm.io page: https://npm.io/package/amazon-dax-client

## Dependencies (5)

- [uuid](https://npm.io/package/uuid.md) ^3.3.2
- [antlr4](https://npm.io/package/antlr4.md) 4.8.x
- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.1692.0
- [jmespath](https://npm.io/package/jmespath.md) ^0.15.0
- [bignumber.js](https://npm.io/package/bignumber.js.md) ^3.0.0

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 1.2.10 (latest) — 2025-07-21
- 1.2.9 — 2022-09-20
- 1.2.8 — 2022-05-11
- 1.2.7 — 2021-12-09
- 1.2.6 — 2021-06-23
- 1.2.5 — 2020-11-27
- 1.2.4 — 2020-03-20
- 1.2.3 — 2020-01-23
- 1.2.2 — 2019-05-22
- 1.2.1 — 2019-02-14
- 1.2.0 — 2018-12-20
- 1.1.4 — 2018-09-12
- 1.1.3 — 2018-06-01
- 1.1.2 — 2018-05-11
- 1.1.1 — 2018-04-11
- … 3 more at https://npm.io/package/amazon-dax-client/versions

## README

# Amazon DAX Client for JavaScript

DAX is a DynamoDB-compatible caching service that enables you to benefit from fast in-memory performance for demanding applications.

This client library provides access from NodeJS to DAX.

## Installing
The Amazon DAX client only runs from NodeJS, and can be installed using npm:
```sh
npm install amazon-dax-client
```

## Usage and Getting Started
You can follow the Getting Started tutorial at:

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.client.sample-app.html

To quickly use DAX, replace `AWS.DynamoDB` with `AmazonDaxClient`:

```javascript
const AmazonDaxClient = require('amazon-dax-client');

// Replace this ...
const ddb = new AWS.DynamoDB({region: region});
/// with this ...
const endpoint = "your-cluster-discovery-endpoint";
const dax = new AmazonDaxClient({endpoints: [endpoint], region: region});

// If using AWS.DynamoDB.DocumentClient ...
const doc = new AWS.DynamoDB.DocumentClient({service: dax});
```

The DAX Cluster Discovery Endpoint can be found the AWS console or by using `aws dax describe-clusters` from the command line.

Creating a connection to your DAX cluster requires using the Cluster Discovery Endpoint URL returned in the DescribeClusters response as the endpoint.

For example:
```javascript
// Format: const endpoint = <ClusterDiscoveryEndpoint.URL>;
const endpoint = 'dax://my-cluster.abc123.dax-clusters.us-east-1.amazonaws.com';
```

## Getting Help
Please use these community resources for getting help.

 * Ask a question on [StackOverflow](https://stackoverflow.com/) and tag it with `amazon-dynamodb-dax`
 * Ask a question on [the AWS DynamoDB forum](https://forums.aws.amazon.com/forum.jspa?forumID=131&start=0)
 * Open a support ticket with [AWS Support](https://console.aws.amazon.com/support/home#/)


## Changes

#### 1.2.10
* Optimized clean-up of connections during timeouts

#### 1.2.9
* Fixed “NeedMoreData: not enough data” error in case of server sending exception-response

#### 1.2.8
* Fixed “NeedMoreData: not enough data” error
  ([#4038](https://github.com/aws/aws-sdk-js/issues/4038))
* Fixed erroneous validation error on duplicate attribute name values in ExpressionAttributeNames

#### 1.2.7
* AuthenticationRequiredException is a retryable request
* Improved request routing, connection management and retry logic

#### 1.2.6
* Add support for TLS and encrypted DAX clusters

#### 1.2.5
* Lock antlr4 to 4.8.x to avoid breaking application running older node version when upgrading to 4.9.0
* Replace use of deprecated Buffer constructors

#### 1.2.4
* Minor bug fixes.

#### 1.2.3
* Retry prefer to choose a different node.
* Adjust exponential back off delay and strategy.

#### 1.2.2
* Fix unrecoverable request timeout after DAX node restart.
* Fix connection timeout during DAX server restart.
* Allow retry for IO exceptions.
* Remove verbose connection error logs.
* Fix empty string encoding bug.

#### 1.2.1
* Bug fix in TransactionGetItems Api to return Key element correctly.

#### 1.2.0
* Support for DynamoDB Transaction Apis.
* Fix excessive background endpoint refresh calls.

#### 1.1.4
* Fix connection leaks on timeout.
* Support configurable requestTimeout. (Default: 60s)

#### 1.1.3
* Fix transient error on tube cleanup
* Fix UpdateItem result parsing with a subset of attributes changed
* Increase default connectTimeout and make it configurable

#### 1.1.2
* Fix socket leaks on validation errors
* Fix SocketTimeout caused by connection establishment
* Fix issue with update response if the item is not changed
* Fix error decoding BatchWrite UnprocessedItems.

#### 1.1.1
* Fix socket leaks on errors

#### 1.1.0
* Brand new decoder for improved performance on large results
* Improved connection/timer management to allow clean exit on Lambda

#### 1.0.2
* Improved connection/timer management to allow clean exit on Lambda

#### 1.0.1
* Initial release

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