简体   繁体   English

如何使用python flask获取最近3个月的AWS结算数据

[英]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. 我需要使用Python和python Flask的最近3个月的AWS账单数据图表。 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. 在我不知道如何使用python和python Flask脚本获取计费数据之后。 Any one have idea please help me.. Thanks in advance. 任何人都有想法请帮助我..在此先感谢。

You can use Boto to connect to AWS using Python. 您可以使用Boto通过Python连接到AWS。

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. 身份验证-您需要设置凭证才能连接到AWS。 Check the Documentation 检查文件
  2. Enable DBR or CUR reports in the billing console. 在结算控制台中启用DBR或CUR报告。 This will export your monthly billing information to S3. 这会将您的每月帐单信息导出到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. 准备就绪后,使用Boto3下载报告并将其导入到DB,ES中,无论您要处理什么大型excel文件。 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. 编辑 :对于以前的几个月,您可以只进入控制台->帐单并直接从控制台下载报告,然后在您的应用程序中对其进行处理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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