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-aurora-bootstrapper

v0.3.6

Published

[![npm version](https://img.shields.io/npm/v/rds-aurora-bootstrapper)](https://www.npmjs.com/package/rds-aurora-bootstrapper) [![npm license](https://img.shields.io/npm/l/rds-aurora-bootstrapper)](https://www.npmjs.com/package/rds-aurora-bootstrapper) [![

Readme

RDS Aurora Bootstrapper (AWS CDK V2)

npm version npm license Node.js

AWS CDK constructs for bootstrapping Aurora PostgreSQL databases via the RDS Data API.

Features

  • AuroraDatabaseCreateOwner — creates a NOLOGIN NOINHERIT owner role and grants it to the master user
  • AuroraDatabaseCreateSchema — creates a schema, assigns ownership to an existing owner role, and optionally drops the public schema with CASCADE
  • AuroraDatabaseCreateUser — creates a LOGIN application user from a Secrets Manager credential secret, grants CONNECT / schema USAGE / table DML, and sets default privileges for the owner role
  • Idempotent owner and user role creation — skips creation when the role already exists
  • Validates PostgreSQL identifiers at synthesis time (ownerUsername, schemaName)
  • Resolves the master username from the credentials secret through a CloudFormation dynamic reference
  • Bundled Lambda custom resources with IAM permissions and Secrets Manager read access configured automatically

Installation

npm install rds-aurora-bootstrapper aws-cdk-lib constructs
yarn add rds-aurora-bootstrapper aws-cdk-lib constructs

Usage

Provision resources in order: owner role → schema → application user.

import { Stack } from 'aws-cdk-lib';
import { Vpc } from 'aws-cdk-lib/aws-ec2';
import {
  AuroraPostgresEngineVersion,
  ClusterInstance,
  DatabaseCluster,
  DatabaseClusterEngine,
} from 'aws-cdk-lib/aws-rds';
import { Secret } from 'aws-cdk-lib/aws-secretsmanager';
import { Construct } from 'constructs';
import {
  AuroraDatabaseCreateOwner,
  AuroraDatabaseCreateSchema,
  AuroraDatabaseCreateUser,
} from 'rds-aurora-bootstrapper';

export class MyStack extends Stack {
  constructor(scope: Construct, id: string) {
    super(scope, id);

    const vpc = new Vpc(this, 'Vpc', { maxAzs: 2 });
    const cluster = new DatabaseCluster(this, 'Cluster', {
      engine: DatabaseClusterEngine.auroraPostgres({
        version: AuroraPostgresEngineVersion.VER_17_6,
      }),
      vpc,
      writer: ClusterInstance.provisioned('writer'),
    });
    const masterUserSecret = new Secret(this, 'MasterUserSecret');
    const appUserSecret = new Secret(this, 'AppUserSecret', {
      generateSecretString: {
        secretStringTemplate: JSON.stringify({ username: 'app_user' }),
        generateStringKey: 'password',
        excludePunctuation: true,
      },
    });

    const createOwner = new AuroraDatabaseCreateOwner(this, 'CreateOwner', {
      dbMasterUserCredentials: masterUserSecret,
      dbCluster: cluster,
      dbName: 'appdb',
      ownerUsername: 'app_owner',
    });

    const createSchema = new AuroraDatabaseCreateSchema(this, 'CreateSchema', {
      dbMasterUserCredentials: masterUserSecret,
      dbCluster: cluster,
      dbName: 'appdb',
      ownerUsername: 'app_owner',
      schemaName: 'app_schema',
      isDropPublicSchema: true,
    });
    createSchema.node.addDependency(createOwner);

    const createUser = new AuroraDatabaseCreateUser(this, 'CreateUser', {
      dbMasterUserCredentials: masterUserSecret,
      targetUserCredentials: appUserSecret,
      dbCluster: cluster,
      dbName: 'appdb',
      ownerUsername: 'app_owner',
      schemaName: 'app_schema',
    });
    createUser.node.addDependency(createSchema);
  }
}

Options

AuroraDatabaseCreateOwnerProps

| Property | Type | Description | | --- | --- | --- | | dbMasterUserCredentials | Secret | Secrets Manager secret with Aurora master credentials. The username field is passed to the custom resource via a dynamic reference. | | dbCluster | DatabaseCluster | Aurora database cluster where the owner role is created. | | dbName | string | PostgreSQL database name targeted by the custom resource. | | ownerUsername | string | Username of the owner role to create (NOLOGIN, NOINHERIT). Must match ^[a-zA-Z_][a-zA-Z0-9_-]*$. |

AuroraDatabaseCreateSchemaProps

| Property | Type | Description | | --- | --- | --- | | dbMasterUserCredentials | Secret | Secrets Manager secret with Aurora master credentials. The username field is passed to the custom resource via a dynamic reference. | | dbCluster | DatabaseCluster | Aurora database cluster where the schema is created. | | dbName | string | PostgreSQL database name targeted by the custom resource. | | ownerUsername | string | Username of the existing owner role that will own the new schema. Must match ^[a-zA-Z_][a-zA-Z0-9_-]*$. | | schemaName | string | Name of the PostgreSQL schema to create. Must match ^[a-zA-Z_][a-zA-Z0-9_-]*$. | | isDropPublicSchema | boolean | When true, drops the public schema with CASCADE after creating the target schema. |

AuroraDatabaseCreateUserProps

| Property | Type | Description | | --- | --- | --- | | dbMasterUserCredentials | Secret | Secrets Manager secret with Aurora master credentials. The username field is passed to the custom resource via a dynamic reference. | | targetUserCredentials | Secret | Secrets Manager secret with the application user credentials (username and password). Used at runtime to create the LOGIN role. | | dbCluster | DatabaseCluster | Aurora database cluster where the user role is created. | | dbName | string | PostgreSQL database name targeted by the custom resource. | | ownerUsername | string | Username of the existing owner role used for default privileges. Must match ^[a-zA-Z_][a-zA-Z0-9_-]*$. | | schemaName | string | Name of the PostgreSQL schema the new user is granted access to. Must match ^[a-zA-Z_][a-zA-Z0-9_-]*$. |

Requirements

  • Node.js >= 20.0.0
  • aws-cdk-lib ^2.232.0
  • constructs ^10.5.1
  • Aurora PostgreSQL cluster with the RDS Data API enabled
  • Secrets Manager secrets containing username and password fields (master credentials, and application user credentials for AuroraDatabaseCreateUser)

License

This project is licensed under the Apache-2.0 License.