kanjo

Summarize AWS Billing

Usage no npm install needed!

<script type="module">
  import kanjo from 'https://cdn.skypack.dev/kanjo';
</script>

README

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