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

paws-cli

v0.3.1

Published

Downloads

4

Readme

PAWS

Simple AWS pricing cli

Install

npm install -g paws-cli

Usage

paws <service> <action> [options]

Supported services:

  • lambda
  • apigateway
  • athena
  • cloudwatch
  • dynamodb
  • ec2
  • cache
  • kinesis
  • firehose
  • rds
  • redshift
  • s3

quote

All services implements command quote.

This command allow to estimate cost of service.

Quote service ec2

> paws ec2 quote -r eu-west-1 -i m3.medium --lease 1yr --upfront partial

Monthly fees:
  Linux/UNIX (Amazon VPC), m3.medium reserved instance applied
   └─  0.027 USD * 730 (Hrs) = 19.710 USD

One-time initial fees:
  Upfront Fee
   └─  211.000 USD

Total:

└─ Total Monthly: $19.71 /month
└─ Initial Fee: $211.00
└─ Smoothed monthly: $37.29 /month

Here smoothed monthly is Total Monthly + Initial fee / (leasing duration * 12)

Quote service s3

> paws s3 quote -r eu-west-1 --volume 16Go

Monthly fees:
  $0.023 per GB - first 50 TB / month of storage used
   └─  0.023 USD * 16 (GB-Mo) = 0.368 USD

Total:

└─ Total Monthly: $0.37 /month

Paramaters tips To? Go? Ko? hours ? minutes? Don't worry with units! When you use parameters, PAW convert with the invoicing unit used by AWS

Paws understand suffix bellow :

  • bytes: Kb, Mb, Gb, Tb, Pb, Eb, Ko, Mo, Go, To, Po, Eo, K, M, G, T, P, E
  • duration: d, h, m, s
  • ops/s: /d, /h, /m, /s

e.g.:

--storage 8Go
--duration 45h
--reads 10/s

Important: To estimate cost, paws load pricing file from aws. Some files (like ec2) are heavy and may take time to load. Be patient, files are put in local cache /tmp/paws

Quote from yml file

Speed up your cost estimation and quote from a simple yaml file !

vars:
  eventsByDay: 4000000

defaults:
  region: eu-west-1
  
services:
  lambda:
    myFooLambda:
      size: 128
      invocations: ${eventsByDay}

  ec2:
    myServer:
      lease: 1yr
      upfront: partial
      instanceType: m3.medium

  s3:
    myBucket:
      volume: 10Go

  dynamodb:
    myDynamo:
      reads: 10/s
      writes: 10/min

This file contains 3 parts :

  • vars: Define your custom vars
  • defaults: Define your defaut params
  • services: List of your services

Each services must be named (eg: myFooLambda)

> paws quote sample.yml

lambda/ myFooLambda
──────────────────────────────────
Monthly fees:
   AWS Lambda - Total Requests - EU (Ireland)
    └─  2e-7 USD * 4000000 (Requests) = 0.800 USD
   AWS Lambda - Total Compute - EU (Ireland)
    └─  0.0000166667 USD * 500000 (Second) = 8.333 USD

Total:

 └─ Total Monthly: $9.13 /month

ec2/ myServer
──────────────────────────────────
Monthly fees:
   Linux/UNIX (Amazon VPC), m3.medium reserved instance applied
    └─  0.027 USD * 730 (Hrs) = 19.710 USD

One-time initial fees:
   Upfront Fee
    └─  211.000 USD

Total:

 └─ Total Monthly: $19.71 /month
 └─ Initial Fee: $211.00
 └─ Smoothed monthly: $37.29 /month

s3/ myBucket
──────────────────────────────────
Monthly fees:
   $0.023 per GB - first 50 TB / month of storage used
    └─  0.023 USD * 10 (GB-Mo) = 0.230 USD

Total:

 └─ Total Monthly: $0.23 /month

dynamodb/ myDynamo
──────────────────────────────────
Monthly fees:
   $0.00 per hour for 25 units of write capacity for a month (free tier)
    └─  0 USD * 7300 (WriteCapacityUnit-Hrs) = 0.000 USD
   $0.00 per hour for 25 units of read capacity for a month (free tier)
    └─  0 USD * 7300 (ReadCapacityUnit-Hrs) = 0.000 USD
   $0.00 per GB-Month of storage for first 25 free GB-Months
    └─  0 USD * 1 (GB-Mo) = 0.000 USD

Total:

 └─ Total Monthly: $0.00 /month


══════════════════════════════════
TOTAL/
──────────────────────────────────

Total:

 └─ Total Monthly: $29.07 /month
 └─ Initial Fee: $211.00
 └─ Smoothed monthly: $46.66 /month

regions

All services implements command regions like this:

> paws ec2 regions

Available regions:
 -  ap-northeast-1
 -  ap-northeast-2
 -  ap-south-1
 -  ap-southeast-1
 -  ap-southeast-2
 -  ca-central-1
 -  eu-central-1
 -  eu-west-1
 -  eu-west-2
 -  eu-west-3
 -  sa-east-1
 -  us-east-1
 -  us-east-2
 -  us-gov-west-1
 -  us-west-1
 -  us-west-2

other commands

Each service implemnts customs commands like instanceTypes for ec2

You can use paws [service] --help to print available commands

List instances

> paws ec2 instanceTypes -r eu-west-1 --family general

Available instances:

 -  m3.2xlarge
 -  m3.large
 -  m3.medium
 -  m3.xlarge
 -  m4.10xlarge
 -  m4.16xlarge
 -  m4.2xlarge
 -  m4.4xlarge
 -  m4.large
 -  m4.xlarge
 -  m5.12xlarge
 -  m5.24xlarge
 -  m5.2xlarge
 -  m5.4xlarge
 -  m5.large
 -  m5.xlarge
 -  t2.2xlarge
 -  t2.large
 -  t2.medium
 -  t2.micro
 -  t2.nano
 -  t2.small

Get more informations

> paws ec2 instanceTypes -r eu-west-1  --search m3.medium --details

Available instances:

 -  m3.medium
        Family                     :    General purpose
        Current Generation         :    Yes
        vCPU                       :    1
        ecu                        :    3
        Physical Processor         :    Intel Xeon E5-2670 v2 (Ivy Bridge/Sandy Bridge)
        Processor Features         :    Intel AVX; Intel Turbo
        Architecture               :    64-bit
        Clock Speed                :    2.5 GHz
        Memory                     :    3.75 GiB
        Storage                    :    1 x 4 SSD
        Network Performance        :    Moderate
        Normalization Size Factor  :    2
        Operating System           :    Windows, RHEL, SUSE, Linux