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

aws-manage-sg

v1.2.1

Published

Manages the creation/deletion/updating of a user's current ip address in multiple AWS security groups

Downloads

33

Readme

AWS Security Group Manager

NPM version Build Status semantic-release Greenkeeper badge FOSSA Status

aws-manage-sg is a utility to manage multi security group rules for a remote worker. It revokes old rules, and grants new rules with the user's current ip address.

Running

  • Create a config file to contain
{
   "username": "johndoe",
   "rules": [
     {
       "name": "basiton",
       "securityGroupId": "sg-396jk989f",
       "ports": [22]
     },
     {
       "name": "kibana",
       "securityGroupId": "sg-3960686b",
       "ports": [443]
     }
   ],
   "region": "us-east-1"
 }
  • username is optional.
  • Install aws-manage-sg npm install -g aws-manage-sg
  • Run to remove old rules and whitelist new ip. aws-manage-sg -f config.json

Notes

  • It is recommended to use the AWS username to ensure that users don't override each others settings. Username resolution happens in this order: command line argument, config file, AWS user, USER env property
  • By default the cli will try to authenticate using details from environment variables, to use a specific profile set the profile explicitly.
  • The AWS user must have the following permissions: ec2:AuthorizeSecurityGroupIngress and ec2:DescribeSecurityGroups
  • If checking in a shared config file, ensure that you have not set the username.

Command Line

Find out the full range of options by running aws-manage-sg -h


$ aws-manage-sg -h
Usage: aws-manage-sg [options]

Options:
  --version       Show version number                                  [boolean]
  -f, --file      Path to config file                                 [required]
  -g, --grant     Run only the grant                                   [boolean]
  -r, --revoke    Run only the revoke                                  [boolean]
  -p, --profile   AWS profile to use
  -u, --username  Username to tag rules with
  --ip            Use specified IP address. If not supplied the detected IP will
                  be used
  -h              Show help                                            [boolean]

Using in another application/library

The library exports a number of functions:

  1. revokePermissions, revokes any permissions for the user in the supplied user groups
  2. grantPermissions, grants permissions for the user in the supplied ip and user groups
  3. useAWSProfile, configures the AWS authentication to use the supplied profile.

See bin/aws-manage-sg.js for an example.

License

FOSSA Status