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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@beesolve/lambda-keep-active

v1.2.0

Published

CDK construct which prevents your Lambda functions to transition into `inactive` state.

Readme

Lambda Keep Active

View on Construct Hub

A function becomes inactive when it has been idle long enough for Lambda to reclaim the external resources that were configured for it. When you try to invoke a function that is inactive, the invocation fails and Lambda sets the function to pending state until the function resources are recreated. If Lambda fails to recreate the resources, the function returns to the inactive state. You might need to resolve any errors and redeploy your function to restore it to the active state.

Lambda function states

Whenever your Lambda function becames inactive waking it up might take up to 90 seconds as per this article.

In order to avoid your Lambda functions to transition to inactive state you should invoke them periodically.

No-one really knows what the "long enough" actually means but there is general consenzus that it might be around 14 days.

At BeeSolve we are invoking our Lambda functions every 3 days in order to be sure they won't transition to inactive state.

Installation

You can install Lambda Keep Active helper through npm or any other npm compatible package manager:

npm i @beesolve/lambda-keep-active

Usage

// stack.ts
import { LambdaKeepActive } from "@beesolve/lambda-keep-active";

const warmer = new LambdaKeepActive(this, "KeepAliveLambda");

const handler = new NodejsFunction(this, 'Handler', { /** your props */});

warmer.keepActive(handler);

For Node.js Lambda handlers you can use keptActive wrapper like this:

// handler.ts
import { keptActive } from "@beesolve/lambda-keep-active";

export const handler = keptActive(async () => {
  // your handler code
});

For Bun Lambda handlers you can use keptActiveFetch wrapper like this:

// bunHandler.ts
import { keptActiveFetch } from "@beesolve/lambda-keep-active";

export default {
  fetch: keptActiveFetch(async (request: Request): Promise<Response> => {
    // your handler code
    return new Response();
  }),
};