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

serverless-aws-lookup-plugin

v0.2.0

Published

A Serverless Framework plugin that resolves ARNs or other fields of AWS resources by their ids/names

Downloads

228

Readme

Serverless AWS Lookup Plugin

A Serverless Framework plugin that resolves ARNs (and other primitive fields) of AWS resources by their names/ids at deploy time via configuration variables.

Especially useful to link Serverless-managed stacks to existing resources with a different lifecycle managed outside of Serverless e.g. by Terraform.

Overview

This plugin adds configuration variable support like:

  • ${aws-lookup(dynamodb-table-by-name, MyTableName)} → resolves to the DynamoDB table ARN
  • ${aws-lookup(wafv2-ipset-regional-by-name, my-ipset)} → resolves to the regional WAFv2 IPSet ARN

You can also drill down into nested fields using an address suffix after a colon, for example:

  • ${aws-lookup(wafv2-ipset-regional-by-name, my-ipset):Id}
  • ${aws-lookup(dynamodb-table-by-name, MyTableName):Table.TableStatus}

If no address is provided, each resolver has a sensible default field to return - usually the ARN.

Requirements

  • Node.js >= 18.20.3 - as required by the Serverless Framework
  • Serverless Framework v3 or v4 installed in your service
  • AWS credentials with permissions to call the relevant AWS APIs - the usual that you'd need to work with Serverless

Usage

Add the plugin to your Serverless service and configure variables:

service: my-service
provider:
  name: aws
  region: us-east-1
custom:
  myTableArn: ${aws-lookup(dynamodb-table-by-name, MyTableName)}
  myWafIpSetArn: ${aws-lookup(wafv2-ipset-regional-by-name, my-ipset)}
plugins:
  - serverless-aws-lookup-plugin

Supported Resolvers

The following resolvers are currently built-in (see RESOLVERS in src/index.js):

  • dynamodb-table-by-name - calls DynamoDB service describeTable with TableName
  • wafv2-ipset-regional-by-name - calls WAFV2 service listIPSets with Scope: REGIONAL and matches on Name
  • wafv2-webacl-regional-by-name - calls WAFV2 service listWebACLs with Scope: REGIONAL and matches on Name

General notes:

  • Matching resolvers that list resources will throw if multiple resources with the same name are found.
  • If no match is found, resolution fails with a clear error.
  • Only primitive results (string/number/boolean/bigint) are returned; non-primitive results cause an error.

Development and contributions

New resolvers welcome as contributions/PRs

Debugging

To see debug logs from the plugin:

sls info --stage=dev --debug=plugin
# or further limit debug output to specific plugin
sls info --stage=dev --debug=plugin:<plugin-name>