npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@reaatech/secret-rotation-provider-aws

v0.1.0

Published

AWS Secrets Manager provider for Secret Rotation Kit

Readme

@reaatech/secret-rotation-provider-aws

npm version License: MIT CI

Status: Pre-1.0 — APIs may change in minor versions. Pin to a specific version in production.

AWS Secrets Manager adapter for Secret Rotation Kit. Implements the SecretProvider interface using the AWS SDK v3.

Installation

npm install @reaatech/secret-rotation-provider-aws @aws-sdk/client-secrets-manager
# or
pnpm add @reaatech/secret-rotation-provider-aws @aws-sdk/client-secrets-manager

@aws-sdk/client-secrets-manager is an optional peer dependency, loaded lazily at runtime. Install it alongside this package; if it's missing the adapter throws a clear error telling you to install it.

Feature Overview

  • Full SecretProvider implementation — CRUD, versioning, rotation sessions, and health checks
  • Native version stage managementAWSCURRENT, AWSPENDING, AWSPREVIOUS for rotation state
  • LocalStack support — custom endpoint for local development and testing
  • Version deprecation — removes all staging labels instead of throwing on unsupported deleteVersion

Quick Start

import { AWSProvider } from '@reaatech/secret-rotation-provider-aws';
import { RotationManager } from '@reaatech/secret-rotation-core';

const provider = new AWSProvider({ region: 'us-east-1' });
const manager = new RotationManager({ providerInstance: provider });
await manager.rotate('my-secret');

API Reference

AWSProvider

Constructor

new AWSProvider(config: AWSProviderConfig)

AWSProviderConfig

| Property | Type | Required | Description | |----------|------|----------|-------------| | type | "aws" | Yes | Discriminator | | region | string | Yes | AWS region | | endpoint | string | No | Custom endpoint for LocalStack or VPC endpoints |

SecretProvider Methods

| Method | Description | |--------|-------------| | createSecret(name, value) | Create a new secret with CreateSecretCommand | | getSecret(name, version?) | Get secret value via GetSecretValueCommand. Defaults to AWSCURRENT stage. | | storeSecretValue(name, value, options?) | Store value via PutSecretValueCommand. Use { stage: "pending" } to mark as AWSPENDING. | | deleteSecret(name, options?) | Delete secret via DeleteSecretCommand. options.permanent enables force deletion. | | listVersions(name) | Paginated version listing via ListSecretVersionIdsCommand | | getVersion(name, versionId) | Get a specific version's value | | deleteVersion(name, versionId) | Remove all staging labels from a version (AWS has no direct version deletion) | | supportsRotation() | Returns true | | beginRotation(name) | Creates a session with AWSPENDING stage | | completeRotation(session) | Promotes pending version to AWSCURRENT via UpdateSecretVersionStageCommand | | cancelRotation(session) | Removes AWSPENDING stage from pending version | | health() | Lightweight health check using ListSecretVersionIdsCommand | | capabilities() | Returns supportsRotation: true, supportsVersioning: true, maxVersions: 100 |

Rotation Flow

beginRotation()           → creates AWSPENDING stage
storeSecretValue(pending) → writes with AWSPENDING label
completeRotation()        → moves AWSPENDING → AWSCURRENT
                           → old AWSCURRENT → AWSPREVIOUS

Usage Patterns

Local Development with LocalStack

const provider = new AWSProvider({
  region: 'us-east-1',
  endpoint: 'http://localhost:4566',
});

Explicit Provider Instance

Rather than using the provider registry, pass the instance directly:

import { AWSProvider } from '@reaatech/secret-rotation-provider-aws';
import { RotationManager } from '@reaatech/secret-rotation-core';

const provider = new AWSProvider({ region: 'us-east-1' });
const manager = new RotationManager({ providerInstance: provider });

Or use the provider registry for dynamic selection:

import '@reaatech/secret-rotation-provider-aws'; // registers 'aws' type
import { createProvider } from '@reaatech/secret-rotation-types';

const provider = createProvider({ type: 'aws', region: 'us-east-1' });

Related Packages

License

MIT