简体   繁体   中英

How to take last 3 months aws billing data using python flask

I need last 3 months AWS billing data in graph using python and python Flask. i found some articles for this, i just created environment in my local machine. after i dont know how to take billing data using python & Python Flask script. Any one have idea please help me.. Thanks in advance.

You can use Boto to connect to AWS using Python.

In general you need to cover several items:

  1. Authentication - You'll need to set up your credentials to be able to connect to AWS. Check the Documentation
  2. Enable DBR or CUR reports in the billing console. This will export your monthly billing information to S3. Check the Documentation
  3. Once ready use Boto3 to download the reports and import them to DB, ES, whatever you're working with to process large excel files. Check the Documentation

Good luck!

EDIT : For previous months you can just go to console -> bills and download the reports from the console directly, then process them in your application.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM