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-cloudwatch-dashboard-plugin

v1.0.0

Published

A serverless plugin for generating a cloudwatch dashboard with widgets for the resources defined in the serverless.yml file.

Readme

serverless-cloudwatch-dashboard

A serverless plugin for generating a cloudwatch dashboard with widgets for the resources defined in the serverless.yml file.

Install

Npm package coming soon.

Usage

serverless.yml

In the serverless.yml file the plugin needs to be added.

plugins:
  - serverless-cloudwatch-dashboard

This will add the plugin and dashboards will be created. If you want to configure the widgets that are created, you will in addition need to add a custom config. This must be done under the custom property.

custom:
  serverless-cloudwatch-dashboard:
    dynamodb:
      metrics:
        - ReturnedBytes

If you don't specify the metrics it will use default metrics for the resource. The defaults is listed below.

Supported resources

Lambda

The functions that are created by serverless is fully supported. The following metrics are supported:

  • Invocations
  • Errors
  • Dead Letter Errors
  • Duration
  • Throttles
  • IteratorAge
  • ConcurrentExceptions
  • UnreservedConcurrentExceptions

Defaults:

  • Invocations
  • Errors
  • Duration

To view documentation on the metrics, please see the official AWS documentation here:
https://docs.aws.amazon.com/lambda/latest/dg/monitoring-functions-metrics.html

DynamoDb

DynamoDb is fully supported. The following metrics are supported:

  • ConditionalCheckFailedRequests
  • ConsumedReadCapacityUnits
  • ConsumedWriteCapacityUnits
  • ReadThrottleEvents
  • ReturnedBytes
  • ReturnedItemCount
  • ReturnedRecordsCount
  • SuccessfulRequestLatency
  • SystemErrors
  • TimeToLiveDeletedItemCount
  • ThrottledRequests
  • UserErrors
  • WriteThrottleEvent

Defaults:

  • ConsumedReadCapacityUnits
  • ConsumedWriteCapacityUnits

To view documentation on the metrics, please see the official AWS documentation here: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/dynamo-metricscollected.html

EC2

EC2 is fully supported. Please note that not all metrics is available for all instances. Please consult official documentation on which metrics that are available for which instance. These metrics are supported:

  • CPUCreditUsage
  • CPUCreditBalance
  • CPUSurplusCreditBalance
  • CPUSurplusCreditsCharged
  • CPUUtilization
  • DiskReadOps
  • DiskWriteOps
  • DiskReadBytes
  • DiskWriteBytes
  • NetworkIn
  • NetworkOut
  • NetworkPacketsIn
  • NetworkPacketsOut
  • EBSReadOps
  • EBSWriteOps
  • EBSReadBytes
  • EBSWriteBytes
  • EBSIOBalance%
  • EBSByteBalance%

Defaults:

  • CPUUtilization

To view documentation on the metrics, please see the official AWS documentation here: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ec2-metricscollected.html

S3

S3 is fully supported. The following metrics are supported:

  • BucketSizeBytes
  • NumberOfObjects
  • AllRequests
  • GetRequests
  • PutRequests
  • DeleteRequests
  • HeadRequests
  • PostRequests
  • SelectRequests
  • ListRequests
  • BytesDownloaded
  • BytesUploaded
  • 4xxErrors
  • 5xxErrors
  • FirstByteLatency
  • TotalRequestLatency

Defaults:

  • GetRequests
  • PutRequests

To view documentation on the metrics, please see the official AWS documentation here: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/s3-metricscollected.html

Example

Example yaml file.

service: test

frameworkVersion: ">=1.1.0"

custom:
  bucket: test 
  serverless-cloudwatch-dashboard:
    dynamodb:
      metrics:
        - ReturnedBytes
plugins:
  - serverless-cloudwatch-dashboard

provider:
  name: aws
  runtime: nodejs4.3
  stage: dev
  region: eu-west-1
  iamRoleStatements:
    - Effect: Allow
      Action:
        - s3:PutObject
      Resource: "arn:aws:s3:::${self:custom.bucket}/*"

functions:
  save:
    handler: handler.save
    environment:
      BUCKET: ${self:custom.bucket}
resources:
  Resources:
    ec2:
      Type: AWS::EC2::Instance
      Properties: 
        InstanceType: t2.micro
        ImageId: ami-7dbc4004
    testtable:
      Type: AWS::DynamoDB::Table
      Properties:
        AttributeDefinitions:
          - AttributeName: firstName
            AttributeType: S
        KeySchema:
          - AttributeName: firstName
            KeyType: HASH
        ProvisionedThroughput:
          ReadCapacityUnits: 1
          WriteCapacityUnits: 1
        TableName: test
    tests3:
      Type: AWS::S3::Bucket
      Properties: 
        BucketName: somebucket

Current limitations

  • You must specify table name or bucket name when defining s3/dynamodb resources.
  • It is not possible to have different metrics for different resources of the same type.
  • A lot of resources is not supported.
  • It's impossible to customize the layout of the dashboard. Some of these issues may be resolved in the future.

If you find a bug, please add it to the issues on github.