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

@uptime.app/serverless-test-stack-pauser

v1.1.5

Published

Serverless Framework plugin for pausing test stacks between CI runs

Readme

serverless-test-stack-pauser

Serverless Framework plugin for pausing deployed test stacks between CI runs.

The repo also contains the Serverless stack that creates the DynamoDB table used for locks and reversible trigger state.

Deploy the lock table

yarn install
yarn deploy --stage test

The stack outputs:

  • LockTableName

Publish the plugin

This repo publishes @uptime.app/serverless-test-stack-pauser from the deploy-npm CircleCI job on master. The job authenticates with NPM_TOKEN and runs yarn publish --patch.

Use in another Serverless service

Install the published plugin:

yarn add --dev @uptime.app/serverless-test-stack-pauser
plugins:
  - '@uptime.app/serverless-test-stack-pauser'

custom:
  testStackPauser:
    exclude:
      refs:
        - SomeLogicalResourceId

If no resources need excluding, no custom.testStackPauser config is needed. The plugin uses the test-serverless-test-stack-pauser-locks table in eu-west-1 and fails if it has not been deployed.

wake and sleep only run when the resolved stage is test. The lock owner is resolved from TEST_STACK_PAUSER_OWNER, CI workflow metadata such as CIRCLE_WORKFLOW_ID, or a local machine fallback.

Commands

sls test-stack-pauser ensure-awake --stage test
sls test-stack-pauser wake --stage test
sls deploy --stage test
sls test-stack-pauser sleep --stage test
sls test-stack-pauser status --stage test
sls test-stack-pauser unlock --stage test
sls test-stack-pauser unlock --stage test --force

ensure-awake is an explicit, idempotent CI-friendly variant of wake: it restores saved trigger state when the stack is sleeping, or just ensures the current owner still holds an awake lock when the stack is already awake.

ensure-awake force-enables paused Lambda event source mappings, restores the saved reversible state, and fails if the stack still looks paused after restoration.

sleep requires the current owner to already hold the active lock. If there is no active lock, it exits without changing the stack. If another owner holds the active lock, it fails.

CircleCI shape for consuming services:

- run:
    name: Ensure test stack is awake
    command: yarn sls test-stack-pauser ensure-awake --stage test

- run:
    name: Deploy to test
    command: yarn deploy --stage test

- run:
    name: Run tests
    command: yarn test:ci

- run:
    name: Sleep test stack if this workflow owns the lock
    command: yarn sls test-stack-pauser sleep --stage test

What Sleep Does

  • Acquires a lock in DynamoDB so another CI run cannot wake/deploy/sleep the same stack at the same time.
  • Discovers deployed CloudFormation resources for the service stack.
  • Disables Lambda event source mappings, including SQS, DynamoDB Streams, and Kinesis.
  • Removes EventBridge Lambda targets, applies an impossible SNS filter policy to Lambda and SQS SNS subscriptions, and removes S3 Lambda notification configs.
  • Pauses scheduled Glue crawlers and deactivates scheduled or conditional Glue triggers.
  • Destructively empties discovered DynamoDB tables, using eu-west-1 for Global Tables and the stack region otherwise.
  • Destructively empties discovered S3 buckets, including object versions and delete markers.

sleep attempts to stop new SNS deliveries to paused subscriptions before they reach Lambda or SQS. wake still purges queued SQS messages before re-enabling Lambda event source mappings, then restores trigger state. DynamoDB and S3 data is not restored.

SNS subscription filter policy changes are eventually consistent, so pausing SNS subscriptions reduces new deliveries but does not guarantee that no messages reach SQS immediately after sleep.

Glue support in v1 is limited to crawler schedules and trigger activation state. Glue jobs and workflows are not directly paused; scheduled job activity is controlled indirectly through Glue triggers.