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

rds-iam-auth

v1.0.1

Published

CLI to generate an IAM authentication token for AWS RDS

Downloads

294

Readme

rds-iam-auth

Generate AWS RDS IAM authentication tokens, usable both as a CLI and as a library. Wraps @aws-sdk/rds-signer.

Install

As a global CLI (from the registry)

The -g flag is required to use rds-iam-auth as a CLI command — without it, npm installs locally and won't put the command on your PATH.

npm i -g rds-iam-auth

This installs the rds-iam-auth command on your PATH, usable from any directory. Requires npm to be pointed at the registry this package is published to (npm config get registry), and that you're authenticated against it if it's a private registry.

As a library dependency (from the registry)

npm install rds-iam-auth

Adds it to your project's package.json so you can require('rds-iam-auth') (see Programmatic usage below). Same registry/authentication requirements as above.

From source (local development)

npm install

To test changes as the global CLI without publishing:

npm i -g .

Rerun npm i -g . after any code change to pick it up in the globally installed command.

CLI usage

rds-iam-auth --host <endpoint> --user <username> [--region <region>] [--port <port>]

| Flag | Alias | Required | Description | | --- | --- | --- | --- | | --host | -h | yes | RDS instance endpoint | | --user | -u | yes | Database username | | --region | -r | no | AWS region. Falls back to AWS_REGION / AWS_DEFAULT_REGION env vars | | --port | -p | no | Database port. Defaults to 5432 (Postgres) | | --help | | | Show usage |

Example:

rds-iam-auth --host mydb.abc123.us-east-1.rds.amazonaws.com --user myuser --region us-east-1

The generated token is printed to stdout. Errors and usage text go to stderr, with a non-zero exit code on failure.

AWS credentials are resolved via the default AWS SDK v3 credential chain (environment variables, shared config/credentials file, EC2/ECS/Lambda role, etc.) — this package only generates the IAM auth token, it does not configure AWS credentials itself.

Programmatic usage

const { getRdsAuthToken } = require('rds-iam-auth');

const token = await getRdsAuthToken({
  host: 'mydb.abc123.us-east-1.rds.amazonaws.com',
  user: 'myuser',
  region: 'us-east-1', // optional, falls back to AWS_REGION / AWS_DEFAULT_REGION
  port: 5432,          // optional, defaults to 5432
});

Project structure

  • lib/get-rds-auth-token.js — core logic (getRdsAuthToken, DEFAULT_PORT)
  • bin/rds-iam-auth.js — CLI entry point
  • index.js — programmatic entry point, re-exports from lib/

Notes

  • On Windows, if the globally installed CLI fails under Git Bash with a confusing error, try PowerShell or cmd.exe instead — this is an environment quirk unrelated to this package.