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

@apigrate/aws-serverless

v0.106.0

Published

Utilities for simplifying development with AWS Serverless technologies. Its objective is to reduce the amount of boilerplate code required to develop and deploy serverless applications.

Readme

aws-serverless

Utilities for working with AWS serverless technology.

Its mission is threefold:

  1. reduce the amount of boilerplate code required to develop and deploy serverless applications.
  2. make it easier to deploy different kinds of Lambda functions to the AWS cloud
  3. encourage development of stack-agnostic business logic. In other words, help write business code that is functionally independent of AWS; allowing it to be repurposed/redployed on other infrastructure with a minimum of rewriting.

Separating Handlers and Processors

This library helps you achieve the goal of having reusable business logic in your backend code with minimal hard-coded platform dependencies.

It imposes a pattern to use when declaring your lambda entry point file.

Processors

Processors encapsulate your business logic. Unless performing functions explicitly using Amazon Web Services, you should strive to minimize their dependencies on any AWS infrastructure. This will make them more reusable in other contexts. Of course, there are times when you want to invoke AWS operations such as enqueing records in SQS etc. We have provided some useful processors that work a out-of-the box.

BaseMessageProcessor

Intended as an abstract class for any custom processor you create. Override the process method. This method receives payload, event, and context from the handler.

EnqueueToSQS

A configurable processor that enqueues whatever payload it receives to an SQS queue.

OAuthS3Initializer

Configurable processor that builds an OAuth 2.0 authorization code workflow URL to start the Oauth process with a provider. It uses AWS S3 to store a state variable that is used to secure the callback portion of the process against man-in-the-middle attacks.

OAuthS3Processor

Configurable processor that handles the OAuth 2.0 authorization code callback. It automatically performs validation of a stored state variable (see OAuthS3Initializer, above), handles the code-for-token exchange, and then stores the OAuth credentials in a configurable S3 location.

Handlers

Handlers perform generalized handling of AWS events, providing payload, event, and context information to your processors. Those included implement default functionality that is fairly commonplace, thus helping cut down on boilerplate, repetitive code. In your serverless entry point, you typically declare your processor, and then inject it your handler definition. Handlers feature a .lambda() method that allows you easily mark the lambda handlers in your entry point NodeJS file.

AWSLambdaGenericHandler

Event-agnostic handler that can be used with AWS services. Typically it is used for handling CloudWatch events. No automatic payload is passed eventProcessor, but the event and context are still available.

AWSLambdaHttpHandler

Handles API gateway events, automatically providing the HTTP payload to the configured eventProcessor.

AWSLambdaHttpRedirectionHandler

Specialized API handler that issues a redirection response based on your eventProcessor, redirection configuration, or both.

AWSLambdaSqsHandler

Handler that receives SQS queue data. Use this handler to receive enqueued payloads, passing the queued message to your eventProcessor automatically from SQS to process it.

Other Utilities

AWSLambdaAuthorizer

Simple API lambda-authorizer function that validates HTTP requests contain a Bearer token that matches the expected configuration.

AWSSqsRetryHandler

Handler provides built-in configuration-based retry-handling from a dead-letter queue that it monitors.