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

@victorykit/npm2lambda

v1.0.1

Published

export NPM package (and dependencies) as AWS Lambda function and layer

Readme

#npm2lambda

This program is a command-line tool for building AWS lambda layers and functions from NPM modules. It traverses an entire NPM module's dependency tree (recursively) and extracts dependencies, as well as peerDependencies for building a lambda layer. If a lib directory is specified (which can be any arbitrary directory), a lambda function will be built by copying the entire directory content. If no lib directory is specified, the root NPM module will be added as a child module to the lambda layer.

If NPM dependencies are platform-specific, make sure to execute this program inside an appropriate environment (e.g. Docker).

The Node.js version will be auto-detected and used for setting an explicit lambda layer path (e.g. nodejs/node18/node_modules).

Zipping the build artifact (though required by AWS Lambda) is not part of this program. Either use infrastructure-as-code tooling specific mechanisms ( e.g. assets in CDK), or build your own.

Getting Started

$ npm install -g @victorykit/npm2lambda
$ npm2lambda --help

alternatively install via Git

$ mkdir py-aws-spitzel && cd $_ && git clone https://bitbucket.org/victorykit/node-npm2lambda.git .
$ npm install -g

Assuming the current working directory is set to a legal NPM module:

Only build a lambda layer of dependencies

$ npm2lambda build . --ignore-module

Build a lambda layer of depdendencies and the root module itself

$ npm2lambda build .

Build a super clean lambda layer of depdendencies and the root module itself

$ npm2lambda build . \
    --ignore node_modules \
    --ignore build

Build a lambda layer of only the root module

$ npm2lambda build . --ignore-child-modules

Build only a lambda function of the root's distribution (dist) artifacts (under lib/).

$ npm2lambda build . lib/ --ignore-child-modules

Change build directory and remove version prefix

$ npm2lambda build . --disable-version-prefix --builddir build/other

License

DL-DE->BY-2.0

Datenlizenz Deutschland – Namensnennung – Version 2.0

(1) Jede Nutzung ist unter den Bedingungen dieser „Datenlizenz Deutschland – Namensnennung – Version 2.0" zulässig.

Die bereitgestellten Daten und Metadaten dürfen für die kommerzielle und nicht kommerzielle Nutzung insbesondere

vervielfältigt, ausgedruckt, präsentiert, verändert, bearbeitet sowie an Dritte übermittelt werden;
mit eigenen Daten und Daten Anderer zusammengeführt und zu selbständigen neuen Datensätzen verbunden werden;
in interne und externe Geschäftsprozesse, Produkte und Anwendungen in öffentlichen und nicht öffentlichen elektronischen Netzwerken eingebunden werden.

(2) Bei der Nutzung ist sicherzustellen, dass folgende Angaben als Quellenvermerk enthalten sind:

Bezeichnung des Bereitstellers nach dessen Maßgabe,
der Vermerk „Datenlizenz Deutschland – Namensnennung – Version 2.0" oder „dl-de/by-2-0" mit Verweis auf den Lizenztext unter www.govdata.de/dl-de/by-2-0 sowie
einen Verweis auf den Datensatz (URI).
Dies gilt nur soweit die datenhaltende Stelle die Angaben 1. bis 3. zum Quellenvermerk bereitstellt.

(3) Veränderungen, Bearbeitungen, neue Gestaltungen oder sonstige Abwandlungen sind im Quellenvermerk mit dem Hinweis zu versehen, dass die Daten geändert wurden.

Data licence Germany – attribution – version 2.0

(1) Any use will be permitted provided it fulfils the requirements of this "Data licence Germany – attribution – Version 2.0".

The data and meta-data provided may, for commercial and non-commercial use, in particular

be copied, printed, presented, altered, processed and transmitted to third parties;
be merged with own data and with the data of others and be combined to form new and independent datasets;
be integrated in internal and external business processes, products and applications in public and non-public electronic networks.

(2) The user must ensure that the source note contains the following information:

the name of the provider,
the annotation "Data licence Germany – attribution – Version 2.0" or "dl-de/by-2-0" referring to the licence text available at www.govdata.de/dl-de/by-2-0, and
a reference to the dataset (URI).
This applies only if the entity keeping the data provides the pieces of information 1-3 for the source note.

(3) Changes, editing, new designs or other amendments must be marked as such in the source note.

URL: http://www.govdata.de/dl-de/by-2-0