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

@decorum/dynamodb-seeder

v0.2.1

Published

Command-line interface for seeding data into DynamoDB

Downloads

9

Readme

@decorum/dynamodb-seeder

Command-line interface for seeding data into DynamoDB

npm version

Why do I need this?

When working with serverless projects, you often need to seed initial tables, indexes, and items into DynamoDB.

Most projects will have accompanying data files that are used to populate the local database via a simple package script. You can also use this to seed remote environments, if you so wish.

What makes this seeder special?

While there are many DynamoDB seeder libraries and utilities available, there are several advantages to ours:

  • YAML Support - Allows for much more compact and readable data files
  • Glob Support - Allows for pattern matching on files
  • Index Support - Can create secondary indexes on tables
  • Lint Support - Data files are linted before seeding and can be linted on demand (CI/CD)
  • Batch Writes - Items are written in batches instead of individually
  • Smart - Seeded in order of Tables -> Indexes -> Items across all files
  • Lightweight - Uses the new modular AWS SDK v3
  • Tested - Complete unit test coverage

When trying various existing DynamoDB seeders, we felt that each had quirks or limitations that were frustrating. So we ended up making this one to suit our needs.

Single-Table Design

We use the Single-Table Design approach to DynamoDB as much as possible. The seeder was built around the common cases and design patterns when using a single table with global secondary indexes (GSIs).

However, even if you are not employing that design pattern you can still use this seeder all the same. We do recommend you checking out Single-Table design though!

If you're curious...

Installation

You can install the command-line interface globally:

$ npm install -g @decorum/dynamodb-seeder

Or as a dev-dependency for your project:

$ npm install -D @decorum/dynamodb-seeder

Usage

Once installed you can use the dynamodb-seeder command-line interface:

dynamodb-seeder <cmd> [args]

Commands:
  dynamodb-seeder lint [options] <files..>    Lints data files for errors
  dynamodb-seeder seed [options] <files..>    Seeds data files into DynamoDB

Options:
  --version  Show version number                                       [boolean]
  --help     Show help                                                 [boolean]

If you want help for specific commands, you can run dynamodb-seeder <cmd>> help.

See the examples for sample YAML files.

Lint

You can lint files individually:

$ dynamodb-seeder lint tables.yml indexes.yml items.yml

Or you can use glob pattern matching:

$ dynamodb-seeder lint './examples/**/*.yml'

examples/indexes.yml - OK
examples/items.yml - OK
examples/tables.yml - ERROR: Sort key type is invalid

This can be useful if you store all your seed data files in a single directory within your project.

NOTE: The lint command will return a non-zero exit code if any data file fails validation.

Seed

You can seed files individually:

$ dynamodb-seeder seed tables.yml indexes.yml items.yml

Or you can use glob pattern matching:

$ dynamodb-seeder seed './examples/**/*.yml'

Validating data files...OK
Seeding table 'MainTable'...EXISTS
Seeding index 'GSI1' on table 'MainTable'...EXISTS
Seeding index 'GSI2' on table 'MainTable'...EXISTS
Seeding items into 'MainTable' table...OK

The seeder will not attempt to re-create any tables or indexes. To do this you will need to delete the table or index and re-seed manually.

NOTE: The seed command will return a non-zero exit code and abort if any error occurs in the seeding process.

Options

--version   Show version number                                      [boolean]
--help      Show help                                                [boolean]
--endpoint  DynamoDB endpoint               [default: "http://localhost:8000"]
--region    AWS region                                  [default: "us-east-1"]