aws-billing
A node API to learn how much your Amazon Web Services hosting costs.
Installation
$ npm install aws-billing
Example
First, set up programmatic billing access.
var accountId = '1111-2222-3333';var key = 'DJ9289DSAKSI2938A';var secret = 'b/4239+skdj292jd92jd29dj229';var bucket = 'company-aws-billing';var region = 'us-west-2';
Then you can query your billing cost:
var billing = accountId key secret bucket region; ;
The costs
variable shows the costs for the current billing period by product.
total: 483925 start: Thu Jan 01 2015 00:00:00 GMT+ end: Thu Jan 08 2015 02:34:50 GMT+ products: 'data transfer': 43212 'elastic mapreduce': 86443 'cloudfront': 12442 'support (business)': 12012 'elasticache': 12412 'simple storage service': 17246 'redshift': 42377 'elastic compute cloud': 12332 'route 53': 45473
License
MIT