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

lambda-debug-local

v2.0.3

Published

A wrapper around lambda to facilitate a better development experience.

Downloads

62

Readme

Lambda Debugging Wrapper

A wrapper around lambda to facilitate a better development experience.

Using this library, you are able to run your lambda function code locally but still trigger it with real events, ie. when a file is uploaded to an S3 bucket. This avoids the need to build, package and deploy your lambda function every time you want to test it.

Package can be found here: https://www.npmjs.com/package/lambda-debug-local

Currently supported triggers:

  • S3NewFileTrigger
  • SQSReceiveMessageTrigger

Usage

Full example:

import { startPollingS3 } from 'lambda-debug-local';
import { handler } from './example-lambda';

console.log('Debugging example-lambda.ts');

startPollingS3({
    handler,
    bucketName: 'my-first-bucket',
    interval: 5000,
    region: 'eu-central-1',
    endpoint: 'http://localhost:4566',
    forcePathStyle: true,
    maxAge: 1000 * 60 * 5, // 5 minutes
    credentials: {
        accessKeyId: 'fake-access-key-id',
        secretAccessKey: 'fake-secret-access-key'
    }
})

Install using npm:

npm install -s lambda-debug-local

Import the startPollingS3 method

import { startPollingS3 } from 'lambda-debug-local';

Call the startPollingS3 method with the following parameters:


startPollingS3({
    handler,
    bucketName: 'my-first-bucket',
    interval: 5000,
    region: 'eu-central-1',
    endpoint: 'http://localhost:4566',
    forcePathStyle: true,
    credentials: {
        accessKeyId: 'fake-access-key-id',
        secretAccessKey: 'fake-secret-access-key'
    }
})

Recommended tools:

This package works great with localstack. Localstack is a local AWS cloud stack that allows you to develop and test your cloud apps offline. It spins up a number of different services, including S3 and SQS, which can be used to trigger your lambda functions.

  • https://www.localstack.cloud/
  • https://github.com/localstack/localstack-desktop
  • https://docs.localstack.cloud/getting-started/installation/ See Makefile for commands to add queues and messages to localstack. Then you can use localstack desktop to browse the queues and messages.

If you use localstack, then the required config is

{
    handler,
    queueUrl: 'http://localhost:4566/000000000000/my-test-queue',
}

Updates:

  • 0.0.5: Adds SQS trigger (startPollingSQS). Config is very similar to S3, but with queueUrl instead of bucketName. There is also no forcePathStyle or maxAge. See example below:
{
    handler,
    queueUrl: 'http://localhost:4566/000000000000/my-test-queue',
    interval: 5000,
    region: 'eu-central-1',
    endpoint: 'http://localhost:4566',
    credentials: {
        accessKeyId: 'fake-access-key-id',
        secretAccessKey: 'fake-secret-access-key'
    }
}

Full example:

import { startPollingSQS } from 'lambda-debug-local';
import { handler } from './example-lambda';

console.log('Debugging example-lambda.ts');

startPollingSQS({
    handler,
    queueUrl: 'http://localhost:4566/000000000000/my-test-queue',
    interval: 5000,
    region: 'eu-central-1',
    endpoint: 'http://localhost:4566',
    credentials: {
        accessKeyId: 'fake-access-key-id',
        secretAccessKey: 'fake-secret-access-key'
    }
})

Development:

Please help me to improve this project by contributing to it. The main thing needed is more available triggers.

Getting started:

Required tools:

  • Docker
  • Node.js
  • npm
  • Localstack (brew install localstack/tap/localstack-cli)
  • Make

npm install make localstack-setup npm run dev