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-component-inventory

v0.2.1

Published

Inventory of AWS components.

Readme

AWS Component Inventory

npm version

Inventory of AWS components.

TODO

  • Add Test code.

Instration

$ npm install -g aws-component-inventory

Usase

In many cases, you must specify config file for selecting appenders you need.

$ aws-component-inventory <command> [options]
  • command

    • componet get aws resources, truncate and recreate component table.
    • linux append middleware of linux to middleware table.
    • windows append middleware of windows to middleware table.
    • cleanup remove middleware of deleted components from middleware table.
  • options

    • -c, --config config js file path
    • -r, --resource (for windows / linux) comma separeted Instance ID or AMI ID

Auth for AWS

~/.aws/credentials

[default]
aws_access_key_id = XXX
aws_secret_access_key = XXX

You can use other auth method.

Config

See config/default.js.

"use strict";

module.exports = {
  appenders: [
    { type: "file-appender", opts: { files: { component: "out_component.log", middleware: "out_middleware.log" } } },
    { type: "dynamodb-appender", opts: { tables: { component: { name: "component", recreate: true }, middleware: { name: "middleware", recreate: false } }, awsopts: { region: "ap-northeast-1" } } },
    { type: "elasticsearch-appender", opts: { endpoint: "search-cmdb-xxxx.ap-northeast-1.es.amazonaws.com", indexes: { component: { name: "component", recreate: true }, middleware: { name: "middleware", recreate: false } }, awsopts: { region: "ap-northeast-1" } } }
  ],
  aws: {
    opts: {
      region: "ap-northeast-1"
    }
  },
  log4js: {
    appenders: [
      { type: "console", layout: { type: "basic" } }
    ]
  },
  linux: {
    middleware: {
      // Append your custom command that output string as one line include name and version.
      systeminfo: { command: "uname", opts: [ "-srvmpio" ] },
      systemrelease: { command: "cat", opts: [ "/etc/system-release" ] },
      rpm: { command: "rpm", opts: [ "-qa" ] }
    }
  },
  windows: {
    middleware: {
      // Append your custom command that output string as one line include name and version.
      systeminfo: { command: "powershell.exe", opts: [ "-command", "[System.Environment]::OSVersion.VersionString" ] },
      win32hotfix: { command: "powershell.exe", opts: [ "-command", "& {Get-HotFix | Select -ExpandProperty 'HotFixID'}" ] },
      win32product: { command: "powershell.exe", opts: [ "-command", "& {Get-WmiObject -Class Win32_Product | % {$_.Name + ',' + $_.Version} }" ] }
    }
  }
};

Commands

component

Output

  • acitype: Resource Type (e.g. EC2_Subnets, EC2_RouteTables, CloudFormation_Stacks).
  • acipk: ID of Resource Type (e.g. i-xxx, sg-xxx, rtb-xxx).
  • acitags: Flatten Key-Value pair of Tags.
  • other data: JSON of describe/list.

Output Sample

[
  {
    "SubnetId": "subnet-xxx",
    "State": "available",
    "VpcId": "vpc-xxx",
    "CidrBlock": "x.x.x.x/x",
    "Tags": [
      {
        "Key": "System",
        "Value": "xxx"
      },
    ],
    "acitype": "EC2_Subnets",
    "acipk": "subnet-xxx",
    "acitags": {
      "System": "xxx"
    }
  },
  {
    "SubnetId": "subnet-xxx",
    "State": "available",
    "VpcId": "vpc-xxx",
    "CidrBlock": "x.x.x.x/x",
    "Tags": [
      {
        "Key": "System",
        "Value": "xxx"
      },
    ],
    "acitype": "EC2_Subnets",
    "acipk": "subnet-xxx",
    "acitags": {
      "System": "xxx"
    }
  }
]

linux

Output

  • acitype: linux
  • acipk: Resource ID. (Instance ID or AMI ID or hostname)
  • other data: array strings of middleware name and version.

Output Sample

[
  {
    "acitype": "linux",
    "acipk": "i-xxx",
    "middleware": {
      "rpm": [
        "java-1.7.0-openjdk-1.7.0.95-2.6.4.0.65.amzn1.x86_64",
        "sqlite-3.7.17-6.13.amzn1.x86_64"
      ]
    }
  },
  {
    "acitype": "linux",
    "acipk": "i-xxx",
    "middleware": {
      "rpm": [
        "java-1.7.0-openjdk-1.7.0.95-2.6.4.0.65.amzn1.x86_64",
        "sqlite-3.7.17-6.13.amzn1.x86_64"
      ]
    }
  }
]

windows

Output

  • acitype: windows
  • acipk: Resource ID. (Instance ID or AMI ID or hostname)
  • other data: array strings of middleware name and version.

Output Sample

[
  {
    "acitype": "windows",
    "acipk": "i-xxx",
    "middleware": {
      "win32product": [
        "IIS 8.0 Express,8.0.1557",
        "Microsoft Office Visio Standard 2007,12.0.6215.1000"
      ]
    }
  },
  {
    "acitype": "windows",
    "acipk": "i-xxx",
    "middleware": {
      "win32product": [
        "IIS 8.0 Express,8.0.1557",
        "Microsoft Office Visio Standard 2007,12.0.6215.1000"
      ]
    }
  }
]

Appenders

file-appender

Configuration options

  • opts {}
    • files {}
      • key : component or middleware.
      • value : file name.

dynamodb-appender

The principle needs permission Create Table, Delete Table, and Update Item.

Configuration options

  • opts {}
    • tables {}
      • key : component or middleware.
      • value {}
        • name : index name.
        • recreate : If this value is true, clear table before register component data.
    • awsopts {} AWS SDK options.

elasticsearch-appender

The principle needs permission Access to Elasticsearch.
You should create index for component and middleware manually.

Configuration options

  • opts {}
    • endpoint : endpoint of Elasticsearch.
    • indexes {}
      • key : component or middleware.
      • value {}
        • name : index name.
        • recreate : If this value is true, clear table before register component data.
    • awsopts {} AWS SDK options.

License

Copyright 2016 t-yamo

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.