Skip to content
Monitor AWS EC2 Costs
Pull request Compare This branch is 4 commits ahead, 10 commits behind vnc:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



"When performance is measured, performance improves. When performance is measured and reported back, the rate of improvement accelerates."

Thomas S. Monson. Favorite Quotations from the Collection of Thomas S. Monson. Deseret Books, 1985

Thomas S. Monson

Honestly the inspiration was my boss and our exponentially increasing AWS bill... but this sounds cooler.


Cloudcost is a node.js web app that provides detail into AWS EC2 costs at a level not available in Amazon bills or usage reports.

Cost can be sliced by

  • instance
  • key/value metadata

Cost can be aggregated by

  • month-to-date
  • instance lifetime

Note that EC2 cost detail prior to use of Cloudcost is unavailable. Cloudcost needs to know when instances start and stop (i.e. needs to be running) to calculate cost accurately.


Dependencies you need to figure out

  • node.js
  • Any time an instance is started, stopped, or terminated a GET request needs to be made like the following:

This webservice is not yet implemented!! To get instance history a log in simpledb is currently used. The aim of the webservice is to abstract away the use of a custom simpledb domain.


The dependencies below are installed automatically (as git submodules) using the installation instructions below.


$ git clone git://
$ cd Cloudcost

# Update submodules
$ git submodule update --init --recursive

# Copy the default configuration file
# and add your AWS account credentials
# note that credentials are defined separately for ec2 and simpledb
$ cp config.json.sample config.json

# open Clouscost/lib/aws-lib/lib/ec2.js
# change the date on line 25 to 2010-11-15
# (or later might work)


$ node server.js

Once it you see "dataGrid refreshed" at least one time on the console you're ready to go. Total Cost and MTD (month-to-date) Cost will take a little time to update depending on how many instances you have and how many starts and stops there are for each.

Go to http://localhost:8081/

Something went wrong with that request. Please try again.