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

aws-price-grabber

v0.0.4

Published

Capture AWS pricing as JSON

Downloads

10

Readme

aws-price-grabber

Capture AWS pricing as JSON

NPM

Build Status Code Climate Coverage Status Dependency Status

Based on a Stack Overflow answer

Description

AWS does not have an API for pricing. Most of the pricing pages however load their data via jsonp. Those jsonp endpoints can and do change. This project will scan a pricing page for the jsonp endpoints it relies on then process those endpoints into JSON.

For each endpoint (pricemap) aws-price-grabber will emit an event allowing the consuerm to parse or store the raw data as they see fit.

Since AWS does not support pulling prices this way, aws-price_grabber will not attempt to manipulate, normalize, or change data in any way. That will be the job of the consming application/module. This will hopefully keep any breaking changes made by AWS to a minimum.

Services that work

  • ec2
  • elasticloadbalancing
  • s3
  • glacier
  • ebs
  • storagegateway
  • rds
  • elasticache
  • dynamodb
  • redshift
  • sqs
  • sns
  • swf
  • cloudsearch
  • elastictranscoder
  • elasticmapreduce
  • kinesis

Services that DO NOT work

The following services embed pricing as HTML and do not use jsonp.

  • ses
  • directconnect
  • vpc
  • lambda
  • cloudfront
  • route53
  • appstream

Use

var awsPriceGrabber = require('awsPriceGrabber-ec2');

// grab all services
var grabber = awsPriceGrabber.requestPricing;
grabber.on('pricemap:received',doSomething);
grabber.on('end',finishSomething);

// grab specific services
var grabber2 = awsPriceGrabber.requestPricing({services:['ec2']});;
...

Scripts

request_all.js

Script that dumps all pricing in JSON to STDOUT

> ./scripts/request_all.js

count_price_endpoints.js

Counts the total number of jsonp endpoints that can be collected

> ./scripts/count_price_endpoints.js

Other useful ec2 pricing projects

  • https://github.com/erans/ec2instancespricing
  • https://github.com/CloudHealth/amazon-pricing