Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/boavizta/cloud-bill
Estimate environmental impact of your AWS resources by combining an AWS cloud usage report with data from Boavizta API.
https://github.com/boavizta/cloud-bill
aws boavizta
Last synced: 13 days ago
JSON representation
Estimate environmental impact of your AWS resources by combining an AWS cloud usage report with data from Boavizta API.
- Host: GitHub
- URL: https://github.com/boavizta/cloud-bill
- Owner: Boavizta
- License: agpl-3.0
- Created: 2022-05-17T13:45:39.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-05-20T08:01:02.000Z (over 2 years ago)
- Last Synced: 2024-11-05T20:17:32.974Z (2 months ago)
- Topics: aws, boavizta
- Language: Python
- Homepage:
- Size: 171 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cloud-bill
Estimate environmental impact of your AWS resources by combining an AWS cloud usage report with data from Boavizta API.
General idea is to use _cold_ data (csv file) retrieved manually from AWS cold explorer (see https://docs.aws.amazon.com/cost-management/latest/userguide/ce-saving.html).
It provides hours of usage for different instances types, and we can use it to query Boa API.⚠ Warning: _Work In Progress_ code produced during Boavizta Hackaton #4 (https://boavizta.org/en).
![cloud bill in context](docs/cloud-bill-system-in-context.png)
## Usage
```sh
# Set you aws profile (you may need aws cli install first)
export AWS_PROFILE=my-custom-profile-name
cd src/bills
# Run the analysis on the provide sample.csv file
python main.py -i sample.csv
```## Source
Relevant source is in `/src/bill`
## Other sample code
These samples were produced during Boavizta Hackaton #4 (https://boavizta.org/en) and mainly left unmaintained.
We keep them because they may provide example about how we can query Cloudwath and Boavizta API.
### Query AWS account
See some examples of querying aws api in `src/sample_code/instance-usage/python print-instance-usage.py`.
## Query account to combine usage with impacts
### Principle
1. Query AWS apis to list all instances of the account and retrieve average CPU utilization
2. Use theses results to query Boavizta API to get impacts### Usage
Authenticate against aws using a specific profile with `export AWS_PROFILE=my-custom-profile-name`.
```bash
cd src/sample_code/instances-impacts-from-cloudwatch
python main.py
``````bash
cd src/sample_code/instances-impacts-from-cloudwatch
python test_main.py
```