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 🙏

© 2024 – Pkg Stats / Ryan Hefner

lambee

v0.2.1

Published

A tool to help developer work with AWS Lambda.

Downloads

5

Readme

Lambee CLI

A tool to help developer work with AWS Lambda. The tool helps make things more:

  • Discoverable: To help you understand what code is out there and what it does.
  • Transparent: To help you understand our running systems. What are they doing? Are they working? If there are issues, what is causing them.

Getting Started

$ npm install --global lambee-cli

This program uses the following environment variables:

  • AWS_PROFILE
  • AWS_DEFAULT_REGION

List Lambda Functions

$ lambee fnlist --help
Usage: lambee fnlist [options]

Prints a list of our Lambda functions.

Options:
  -V, --version        output the version number
  --profile <profile>  The AWS profile. You can set this using environment variable AWS_PROFILE.
  --region <region>    The AWS region. You can set this using environment variable AWS_DEFAULT_REGION.
  -c, --cache          Cache results locally. Makes repeated execution much quicker on slow networks. Will not pick up changes to the functions list though.
  -v, --verbose        Prints the full object returned by AWS SDK instead of just the function name.
  -d, --debug          Enable debug logging
  -h, --help           output usage information

Print Lambda Function Logs

$ lambee fnlogs --help
Usage: lambee fnlogs [options] <functionName>

Prints nice clean logs for a Lambda function.

Options:
  -V, --version                output the version number
  -s, --startTime [startTime]  Start time eg "10 mins ago"
  -e, --endTime <endTime>      End time eg "5 mins ago"
  -l, --logLevel <logLevel>    1: All, 2: DEBUG (default), 3: INFO, 4: ERROR
  -p, --profile [profile]      The AWS profile. You can set this using environment variable AWS_PROFILE.
  -r, --region <region>        The AWS region. You can set this using environment variable AWS_DEFAULT_REGION.
  -c, --cache                  Cache results locally. Makes repeated execution much quicker on slow networks. Will not pick up changes to the logs though.
  --debug                      Enable debug logging
  -h, --help                   output usage information

To get nicely formatted logs you should write the logging statements in your functions something like this:

console.error("Description of the error", error);

console.info("Something interesting happened", details);

process.env.DEBUG_LOGGING && console.debug("Something interesting happened", details);

Open Lambda Function in AWS Console

$ lambee fnopen --help
Usage: fnopen [options] <functionName>

Opens a Lambda function in the AWS console.

Options:
  --region <region>  The AWS region. You can set this using environment variable AWS_DEFAULT_REGION.
  -h, --help         output usage information

List SSM Params

$ lambee paramlist --help
Usage: lambee paramlist [options]

Prints the names and descriptions of our params stored in AWS SSM. Typically this will be for secret config like passwords and keys. Note, this function does not give you the config values.

Options:
  -V, --version        output the version number
  --profile <profile>  The AWS profile. You can set this using environment variable AWS_PROFILE.
  --region <region>    The AWS region. You can set this using environment variable AWS_DEFAULT_REGION.
  -c, --cache          Cache results locally. Makes repeated execution much quicker on slow networks. Will not pick up changes to the functions list though.
  -v, --verbose        Prints the full object returned by AWS SDK instead of just the function name.
  -d, --debug          Enable debug logging
  -h, --help           output usage information

Release Notes

0.2.0 (17 September 2019 - David)

  • fnopen - Opens a Lambda function in the AWS console.

0.1.0 (16 September 2019 - David)

  • params - Lists the params we have stored in SSM so that we can easily find and use them in our projects.

0.0.3 (12 September 2019 - David)

  • logs - Log files are part of system transparency. We don't want to have the situation where the system breaks and we don't know what the heck made it fall over. When the system breaks we want to be able to look into the inner workings of the program and find the root cause ASAP.
  • functions list - See a list of our Lambda functions.

To Do List

  • invoke function - Ability to invoke a Lambda function from the cli.
  • describe function - See the README file for a Lambda function so that you can discover what it does.
  • print function environment variables - Query and edit a Lambda functions environment variables.