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-tag-resources

v3.1.2

Published

Datamart: Tag all AWS resources with dual legacy + datamart:* tag support

Downloads

7,812

Readme

serverless-tag-resources

Serverless Framework plugin to tag all AWS resources. Supports dual tagging (legacy PascalCase + new datamart:* format) for transition periods.

Features

  • Tags all resources created by Serverless Framework
  • Tags resources in the resources section
  • Handles dict-based tag resources (SSM Parameter, API GW V2, Glue, Batch)
  • Post-deploy tagging for RDS Clusters, Firehose, EC2 related resources
  • Auto-generates Stage / datamart:environment from deployment stage
  • Auto-generates Resource / datamart:resource from CloudFormation LogicalID
  • Optional tag validation against allowed domains
  • AWS SDK v3

Installation

npm i serverless-tag-resources

Add to plugins:

plugins:
  - serverless-tag-resources

Configuration

Tags (provider.stackTags)

provider:
  stackTags:
    # Legacy tags (maintained for backwards compatibility)
    CostCenter: getdata
    BusinessUnit: getdata-cl
    Service: ${self:service}
    Component: api
    Customer: common

    # New datamart:* tags
    datamart:cost-center: getdata
    datamart:business-unit: getdata-cl
    datamart:service: ${self:service}
    datamart:component: api
    datamart:finops-scope: runtime
    datamart:data-classification: confidential
    datamart:criticality: high
    datamart:team: platform

The plugin auto-adds these tags (no need to specify):

  • Stage / datamart:environment — set to the deployment stage
  • Resource / datamart:resource — set to the CloudFormation LogicalID

Validation (optional)

Enable tag validation to enforce required tags and allowed values:

custom:
  datamart:
    validation: true

When enabled, deployment fails if required datamart:* tags are missing or have invalid values.

Required tags: datamart:cost-center, datamart:finops-scope, datamart:data-classification, datamart:criticality, datamart:team

Validated values:

  • datamart:finops-scope: runtime, compliance, security, scraping, ai, devtools, infrastructure
  • datamart:environment: prod, homo, qa, dev, sandbox, dr
  • datamart:data-classification: public, internal, confidential, restricted
  • datamart:criticality: critical, high, medium, low
  • datamart:cost-center: datamart, getdata, connect, vizdata, legalbase, facesign, keyshield, lendbot, jscipher, atlas, openfinance, payments, operations

How it works

Hook 1: before:package:finalize

Mutates the CloudFormation template to inject tags into all supported resources before deployment. Handles both list-based ([{Key, Value}]) and dict-based ({key: value}) tag formats depending on the resource type.

Hook 2: after:deploy:deploy

Tags resources that need post-deploy API calls:

  • SSM Parameters (AddTagsToResource)
  • Pinpoint Apps (TagResource)
  • API Gateway V2 (Api, Stage, DomainName, VpcLink)
  • RDS Clusters (AddTagsToResource)
  • Kinesis Firehose (TagDeliveryStream)
  • EC2 Instances + related resources (EBS volumes, ENIs, EIPs, Security Groups)

Development

npm install
npm test
npm run test:verbose
npm run test:coverage

Changelog

v3.0.0 (April 2026)

  • Migrated to AWS SDK v3
  • Modular architecture (src/ directory)
  • Dual tag support: legacy PascalCase + datamart:* format
  • Auto-generated datamart:environment and datamart:resource tags
  • Optional tag validation with domain enforcement
  • Fixed: Stage tag was never added to list-based resources (concat bug)
  • Fixed: forEach+async pattern (promises were not awaited)
  • Fixed: dict-based resources now tagged in CF template (was commented out)
  • Fixed: Glue::Crawler contradiction (was in both supported and unsupported lists)
  • Added Jest test suite (60+ tests)
  • Removed unused helpers (awsCloudFormation.js, awsSSM.js)

v2.5.2

  • Last version before refactor
  • Single file architecture (index.js)
  • AWS SDK v2

License

ISC