This architecture will create cost usage report that will have latest cost data refreshed every one hour.
# if you do not have virtualenv
sudo pip3 install virtualenv
Create python virtual environment
virtualenv .venv
Activate your virtual environment
source .venv/bin/activate
Install dependencies
sudo pip3 install -r requirements.txt
Run code
python3 index.py
Note this is not production ready and well tested code. This is just to show you potential capability to compare the cost usage report. Before using this code please make sure you have tested and modified the code as per your business requirements.