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

arc-plugin-tables-local-indexes

v0.1.1

Published

Architect plugin to setup Local Secondary Indexes (LSI) in DynamoDB tables.

Readme

Architect plugin: @tables-local-indexes

Defines Local Secondary Indexes for your project's DynamoDB tables. @tables-local-indexes should only ever be paired with @tables.

Recommended Resources

DynamoDB is a powerful database, though different from both SQL and NoSQL databases. It is highly recommended to dig into Amazon's resources to familiarize yourself with it:

Syntax

  • Note that local secondary indexes can only be declared at table creation: it cannot be changed afterwards; a new table would need to be created
  • @tables-local-indexes is a feature subset of @tables; as such, the names of your declared indexes must match those of your @tables
  • Otherwise, the basic syntax for defining @tables-local-indexes primary keys is similar to @tables:
    • Partition key - beware that local secondary indexes share the same partition key as the base table, so it can be skipped
    • Sort key, defined by **, is required
    • Currently only **String, and **Number are supported
  • An optional name property can be provided to explicitly name the index. This is helpful when querying the index with the AWS SDK as you know what to pass to the IndexName query parameter
  • An optional projection property can be provided to explicitly define which item attributes get projected, or included, in query results. By default, this plugin will project all item attributes (the ALL projection type as described in the DynamoDB documentation on attribute projections)
    • Customizing which attributes to project can be helpful when trying to save on bandwidth costs
    • Note that once a projection is defined, it cannot be changed; a new table would need to be created
    • Acceptable values for projection are:
      • all (default): all item attributes from the table are projected
      • keys: only the base table's partition key and the local secondary index' sort key are projected
      • Custom: otherwise, you may define one or more attribute names to explicitly project into the index. Note that the base table's partition key and index' sort key always get projected

Example

The following app.arc file defines a DynamoDB table with two Local Secondary Indexes, both with projection explicitly defined:

@app
testapp

@tables
accounts
  accountID *String

@tables-local-indexes
accounts
  email **String # Sort key is required!
  projection keys # only project base table's partition key and index' sort key (in this example that would be accountID and email)
  name byEmail

accounts
  accountID *String # Partition key is the same as the main table - it is optional, but explicitly declared here
  created **String # Sort key is required!
  projection updated lastAccessed # only project base table's partition key and index' sort key, plus the updated and lastAccessed attributes