# @aws-sdk/endpoint-cache

> [![NPM version](https://img.shields.io/npm/v/@aws-sdk/endpoint-cache/latest.svg)](https://www.npmjs.com/package/@aws-sdk/endpoint-cache) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/endpoint-cache.svg)](https://www.npmjs.com/package/@aws-sdk/e

Latest version **3.972.11** (published 2026-08-14) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @aws-sdk/endpoint-cache
pnpm add @aws-sdk/endpoint-cache
yarn add @aws-sdk/endpoint-cache
bun add @aws-sdk/endpoint-cache
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.972.11 |
| Published | 2026-08-14 |
| First published | 2021-05-14 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=20.0.0 |
| Dependencies | 2 |
| Unpacked size | 19.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3664 |
| Author | AWS SDK for JavaScript Team |
| Maintainers | amzn-oss, aws-sdk-bot |

## Links

- npm: https://www.npmjs.com/package/@aws-sdk/endpoint-cache
- Repository: https://github.com/aws/aws-sdk-js-v3
- Homepage: https://github.com/aws/aws-sdk-js-v3/tree/main/packages-internal/endpoint-cache
- Issues: https://github.com/aws/aws-sdk-js-v3/issues
- npm.io page: https://npm.io/package/@aws-sdk/endpoint-cache

## Dependencies (2)

- [tslib](https://npm.io/package/tslib.md) ^2.6.2
- [mnemonist](https://npm.io/package/mnemonist.md) 0.38.3

## Recent versions

- 3.972.11 (latest) — 2026-08-14
- 3.972.10 — 2026-08-11
- 3.972.9 — 2026-07-08
- 3.972.8 — 2026-06-15
- 3.972.7 — 2026-06-08
- 3.972.6 — 2026-06-05
- 3.972.5 — 2026-03-26
- 3.972.4 — 2026-03-05
- 3.972.3 — 2026-02-26
- 3.972.2 — 2026-01-26
- 3.972.1 — 2026-01-22
- 3.972.0 — 2026-01-20
- 3.971.0 — 2026-01-16
- 3.968.0 — 2026-01-13
- 3.965.0 — 2026-01-07
- … 43 more at https://npm.io/package/@aws-sdk/endpoint-cache/versions

## README

# @aws-sdk/endpoint-cache

[![NPM version](https://img.shields.io/npm/v/@aws-sdk/endpoint-cache/latest.svg)](https://www.npmjs.com/package/@aws-sdk/endpoint-cache)
[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/endpoint-cache.svg)](https://www.npmjs.com/package/@aws-sdk/endpoint-cache)

### :warning: Internal API :warning:

> This is an internal package.
> That means this is used as a dependency for other, public packages, but
> should not be taken directly as a dependency in your application's `package.json`.

> If you are updating the version of this package, for example to bring in a
> bug-fix, you should do so by updating your application lockfile with
> e.g. `npm up @scope/package` or equivalent command in another
> package manager, rather than taking a direct dependency.

---

## EndpointCache

- uses `mnemonist/lru-cache` for storing the cache.
- the `set` operation stores milliseconds elapsed since the UNIX epoch in Expires param based on CachePeriodInMinutes provided in Endpoint.
- the `get` operation returns all un-expired endpoints with their Expires values.
- the `getEndpoint` operation returns a randomly selected un-expired endpoint.

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