https://github.com/fivexl/aws-cost-and-usage-report-generator
Python script to generate montly AWS cost and usage report break down
https://github.com/fivexl/aws-cost-and-usage-report-generator
aws billing cost cur
Last synced: 8 months ago
JSON representation
Python script to generate montly AWS cost and usage report break down
- Host: GitHub
- URL: https://github.com/fivexl/aws-cost-and-usage-report-generator
- Owner: fivexl
- License: apache-2.0
- Created: 2021-08-05T18:43:42.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-07-03T07:51:05.000Z (about 2 years ago)
- Last Synced: 2025-03-24T08:54:41.168Z (over 1 year ago)
- Topics: aws, billing, cost, cur
- Language: Python
- Homepage:
- Size: 109 KB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://fivexl.io/)
# aws-cost-and-usage-report-generator
Python script to generate montly AWS cost and usage report break down
## Usage
Script will generate montly unblended cost report for the last 3 month as well will calculate normalized daily cost.
Make sure to set AWS creds for the account for which you want to generate a report
Take the output file, import it to Google Sheets, fill in comments and suggestions, export as pdf and share with the customer.
Output file is optimized for the workflow above.
```
> bash setup.sh
....
> source env/bin/activate
> python3 aws-cost-and-usage-report.py -h
usage: aws-cost-and-usage-report.py [-h] [--sensetivity SENSETIVITY] [--out OUT] [--debug]
Generate cost and usage report for the last 3 month grouped by service
optional arguments:
-h, --help show this help message and exit
--sensetivity SENSETIVITY
Sensetivity of cost change formatting (default: 0.1)
--out OUT Output file name (default: cost-and-usage-report-2021-08-05.xlsx)
--debug Print debug info (default: False)
> python3 aws-cost-and-usage-report.py
INFO: Found credentials in environment variables.
INFO: Getting montly cost and usage report from 2021-05-01 to 2021-08-01
INFO: Cost change sensetivity is set to 0.1
INFO: Found credentials in environment variables.
INFO: Parsing report
INFO: Calculating total cost per month
INFO: Calculating normalized cost per month
INFO: Writing repot to cost-and-usage-report-2021-08-05.xlsx
INFO: Done
```
## Example
See [example report](cost-and-usage-report-2021-08-05.xlsx) for more details
## Post review
- Post review [url](https://github.com/fivexl/aws-cost-and-usage-report-generator/compare/review...main)