# aws-eks-token

> Generate EKS token with signature v4 signing process.

Latest version **1.0.5** (published 2021-04-28) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install aws-eks-token
pnpm add aws-eks-token
yarn add aws-eks-token
bun add aws-eks-token
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2021-04-28 |
| First published | 2020-10-03 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 119.7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Shawn Qin |
| Maintainers | qinshuang1998 |
| Keywords | aws, eks, token |

## Links

- npm: https://www.npmjs.com/package/aws-eks-token
- Repository: https://github.com/qinshuang1998/aws-eks-token
- Homepage: https://github.com/qinshuang1998/aws-eks-token#readme
- Issues: https://github.com/qinshuang1998/aws-eks-token/issues
- npm.io page: https://npm.io/package/aws-eks-token

## Dependencies (4)

- [dayjs](https://npm.io/package/dayjs.md) ^1.9.1
- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.766.0
- [bluebird](https://npm.io/package/bluebird.md) ^3.7.2
- [crypto-js](https://npm.io/package/crypto-js.md) ^4.0.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2021-04-28
- 1.0.4 — 2021-04-28
- 1.0.3 — 2020-10-14
- 1.0.2 — 2020-10-14
- 1.0.1 — 2020-10-11
- 1.0.0 — 2020-10-03

## README

# aws-eks-token
[![codecov](https://codecov.io/gh/qinshuang1998/aws-eks-token/branch/main/graph/badge.svg)](https://codecov.io/gh/qinshuang1998/aws-eks-token)
[![Build Status](https://travis-ci.org/qinshuang1998/aws-eks-token.svg?branch=main)](https://travis-ci.org/github/qinshuang1998/aws-eks-token)

Generate EKS token with signature v4 signing process.

## Quick Start

#### 0. Install from npm.

```shell
npm install aws-eks-token
```

#### 1. Generation with default credential file, we will read your credentials in an effective way, the config of aws-eks-token depends on aws-sdk's implementation.

```javascript
const EKSToken = require('aws-eks-token');
EKSToken.renew('cluster-name').then(token => {
    console.log(token);
});
```
> If more than one credential source is available to the SDK, the default precedence of selection is as follows:
>
> 1. Credentials that are explicitly set through the service-client constructor
> 2. Environment variables
> 3. The shared credentials file
> 4. Credentials loaded from the ECS credentials provider (if applicable)
> 5. Credentials that are obtained by using a credential process specified in the shared AWS config file or the shared credentials file. For more information, see [Loading Credentials in Node.js using a Configured Credential Process](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/loading-node-credentials-configured-credential-process.html).
> 6. Credentials loaded from AWS IAM using the credentials provider of the Amazon EC2 instance (if configured in the instance metadata)
>
> For more information, see [Class: AWS.Credentials](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Credentials.html) and [Class: AWS.CredentialProviderChain](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CredentialProviderChain.html) in the API reference.

#### 2. So, you can also set custom configuration like in aws-sdk.

```javascript
EKSToken.config = {
    accessKeyId: 'AKID',
    secretAccessKey: 'SECRET',
    sessionToken: 'SESSION [Optional]',
    region: 'us-west-2'
};
```

#### 3. You can set the expiration time and request time you want too.

```javascript
EKSToken.renew('eks-cluster', '60', '20200930T093726Z');
```

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