AWS get cost by specific users

穿精又带淫゛_ 提交于 2021-02-08 06:46:00

问题


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?


回答1:


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 and

Python boto3 : https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ce.html

This is one of developer has done this. You can use as reference : https://github.com/hjacobs/aws-cost-and-usage-report



来源:https://stackoverflow.com/questions/63702548/aws-get-cost-by-specific-users

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!