AWS按特定用户收取费用 [英] AWS get cost by specific users
问题描述
我希望查看特定用户每月在我公司的AWS账户上的支出.到目前为止,我只能按服务查看每月支出.可以使用AWS Cost Explorer来完成.AWS Cloudtrail允许我查看任何用户活动.有什么办法可以将这两项服务结合起来实现我的目标?还是会以另一种方式完成?
I would like to see the spendings on my company's AWS account monthly, by specific users. So far I am only able to see the spendings monthly by service. This can be done using AWS Cost explorer. AWS Cloudtrail allows me to see any user activity. Is there any way to combine these two services to reach my goal? Or would it be done another way?
推荐答案
您必须使用语言AWS SDK支持编写自定义脚本.我会建议使用 boto3
You have to write custom script using language AWS SDK support.
I will suggest python using boto3
AWS CLI: https://docs.aws.amazon.com/cli/latest/reference/ce/get-cost-and-usage.html 和
Python boto3: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ce.html
Python boto3 : https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ce.html
这是开发人员执行的操作之一.您可以参考: https://github.com/hjacobs/aws-cost-and-usage-报告
This is one of developer has done this. You can use as reference : https://github.com/hjacobs/aws-cost-and-usage-report
这篇关于AWS按特定用户收取费用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!