# @rumblefishdev/eth-signer-kms

> Sign ethereum transaction/messages using KMS service from AWS

Latest version **4.3.1** (published 2026-05-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install @rumblefishdev/eth-signer-kms
pnpm add @rumblefishdev/eth-signer-kms
yarn add @rumblefishdev/eth-signer-kms
bun add @rumblefishdev/eth-signer-kms
```

## Health

**Score 60/100 (C)** — status: active.

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

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 4.3.1 |
| Published | 2026-05-21 |
| First published | 2021-06-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 41.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 13 |
| Maintainers | marek.kowalski, denciu, misieq01, mmisiorek-rf, karczu, spiotrrf |

## Links

- npm: https://www.npmjs.com/package/@rumblefishdev/eth-signer-kms
- Repository: https://github.com/rumblefishdev/eth-signer-kms
- Homepage: https://github.com/rumblefishdev/eth-signer-kms#readme
- Issues: https://github.com/rumblefishdev/eth-signer-kms/issues
- npm.io page: https://npm.io/package/@rumblefishdev/eth-signer-kms

## Dependencies (4)

- [bn.js](https://npm.io/package/bn.js.md) ^4.12.0
- [ethers](https://npm.io/package/ethers.md) ^6
- [asn1.js](https://npm.io/package/asn1.js.md) ^5.4.1
- [@types/ethereum-protocol](https://npm.io/package/@types/ethereum-protocol.md) ^1.0.1

## Recent versions

- 4.3.1 (latest) — 2026-05-21
- 4.0.0 — 2025-05-16
- 3.1.3 — 2025-05-15
- 3.1.1 — 2025-05-14
- 3.1.0 — 2024-08-02
- 3.0.0 — 2023-10-02
- 2.3.0 — 2022-11-29
- 2.2.0 — 2022-09-12
- 2.1.0 — 2022-07-12
- 2.0.0 — 2022-06-08
- 1.7.0 — 2022-05-30
- 1.6.0 — 2022-05-20
- 1.5.0 — 2022-05-19
- 1.3.0 — 2022-05-16
- 1.2.0 — 2021-11-24
- … 7 more at https://npm.io/package/@rumblefishdev/eth-signer-kms/versions

## README

# @rumblefishdev/eth-signer-kms

Web3 signer that derives address and signs transactions using [AWS KMS](https://aws.amazon.com/kms/).

## Install
```
$ npm i @rumblefishdev/eth-signer-kms
```

## Requirements
```
aws-sdk
```

In order to work properly AWS KMS managed key must be:
- asymmetric
- able to sign and verify
- ECC_SECG_P256K1 specified


### IAM permissions

Client using the library should have the following IAM permissions to the key that it uses:

```
  - Effect: Allow
    Action:
      - 'kms:Sign'
      - 'kms:GetPublicKey'
    Resource: !Ref KMSKeyArn
```

## Usage

#### * Before use, make sure that AWS SDK is properly configured! Find out how to do it [here](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/configuring-the-jssdk.html).


KMSSigner is an [ethers](https://docs.ethers.io/v5/api/signer/) `Signer` instance that uses AWS KMS stored keys to sign ethereum transactions.

`keyId` can be obtained via `KMS` package of `aws-sdk` or directly via AWS console.
https://github.com/ethereumjs/ethereumjs-monorepo

### Parameters:

| Parameter | Type | Default | Required | Description |
| ------ | ---- | ------- | ----------- | ----------- |
|`keyId`|`string`| `null`| [x] | Key ID of AWS KMS managed private key |
| `provider` | `providers.Provider` | `null` | [x] | [Official doc](https://docs.ethers.io/v5/api/providers/provider/) |
|`kmsInstance` | `AWS.KMS` | `new AWS.KMS()` | [ ] | KMS instance from [Official doc](https://www.npmjs.com/package/aws-sdk)

## Examples

##### KmsSigner
- [KmsSigner initialization](https://github.com/rumblefishdev/eth-signer-kms/blob/master/tests/signer.test.ts#L50)
```
new KMSSigner(provider, keyId, kms)
```

- [signMessage](https://github.com/rumblefishdev/eth-signer-kms/blob/master/tests/signer.test.ts#L72)
```
await kmsSigner.signMessage(...)
```

- [_signTypedData](https://github.com/rumblefishdev/eth-signer-kms/blob/master/tests/signer.test.ts#L102)
```
await kmsSigner._signTypedData(...)
```
##### function getEthAddressFromKMS
- [getEthAddressFromKMS](https://github.com/rumblefishdev/eth-signer-kms/blob/master/tests/signer.test.ts#L39)
```
await getEthAddressFromKMS(...)
```

## Migration from v1.7.0 to v2.0.0:
`KMSProvider` class became `KMSSigner`, as its instance no longer creates provider but receives one in constructor.

That approach extracts provider dependency from the package and as a result makes it more flexible in terms of use and testing.

### Version 1.7.0:

| Parameter | Type | Default | Required | Description |
| ------ | ---- | ------- | ----------- | ----------- |
|`keyId`|`string`| `null`| [x] | Key ID of AWS KMS managed private key |
| `providerOrUrl` | `string/object` | `null` | [x] | [Official doc](https://github.com/trufflesuite/truffle/blob/develop/packages/hdwallet-provider/README.md#instantiation) |
|`chainSettings` | `Common` | `{}` | [ ] | Common object used to configure tx options. If chainId is not passed, it will be obtained automatically via `eth_chainId`. For details instructions please refer to [Common](https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/common) and [Tx]() official docs|
| `shareNonce` | `boolean` | `true` | [ ] | [Official doc](https://github.com/trufflesuite/truffle/blob/develop/packages/hdwallet-provider/README.md#instantiation) |
| `pollingInterval` | `number` | `4000` | [ ] | [Official doc](https://github.com/trufflesuite/truffle/blob/develop/packages/hdwallet-provider/README.md#instantiation) |

## Credits:

[@lucashenning](https://github.com/lucashenning/aws-kms-ethereum-signing)
[@truffle team](https://github.com/trufflesuite/truffle/tree/develop/packages/hdwallet-provider)

---
_Source: https://npm.io/package/@rumblefishdev/eth-signer-kms · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
