0.2.0 • Published 10 years ago

kanjo v0.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

kanjo

NPM version NPM downloads Build Status Coverage Status Dependency Status DevDependency Status License

Summarize AWS Billing

Installation

npm install kanjo

Usage

import Kanjo from 'kanjo';

const kanjo = new Kanjo({
  account: 'ACCOUNT_ID',
  bucket: 'BUCKET_NAME',
  region: 'us-east-1'
});

kanjo.fetch(2015, 9).then(report => {
  console.log(report);
});

// Output ->
// { bills:
//    { total:
//       { accountId: 'xxxxxxxxxx',
//         accountName: 'account foo',
//         isPayer: true,
//         totalCost: 1360.57,
//         products: [Object] },
//      'xxxxxxxxxx':
//       { accountId: 'xxxxxxxxxx',
//         accountName: 'account foo',
//         isPayer: false,
//         totalCost: 1148.807296,
//         products: [Object] },
//      'yyyyyyyyyy':
//       { accountId: 'yyyyyyyyyy',
//         accountName: 'account bar',
//         isPayer: false,
//         totalCost: 211.706951,
//         products: [Object] } } }

Related

Todo

  • Add tests
  • Support weekly summary
  • Support daily summary
  • Support monthly forecast