How to view AWS Billing cost for resources created by an IAM user?

时光毁灭记忆、已成空白 提交于 2021-01-27 20:19:26

问题


In brief

We need to view AWS cost for resources created by a specific IAM user via aws:createdBy tag.

In full

My google search is not helpful - it gives me one idea to use Consolidated Billing for Organizations to have the view of cost-by-user billing but that requires to create separate AWS users, which again requires credit card.

Another solution I found is that we can view AWS cost by tag grouping via Cost Explorer report though we cannot find the mentioned tag createdBy as stated in that AWS guide?

The ideal solution should let us create as many IAM users as the number of projects may grow i.e. one IAM user per project; and then, give us the report of AWS cost for each of those users.

So, how can we get to it?


回答1:


Costs are not incurred by IAM Users. The AWS Account owning the resource incurs the charge.

When an IAM User makes a request to AWS, their credentials are verified to ensure that they are the authorized person and their permissions are checked to confirm that they have permission to perform the operation. However, there is no further relationship between the person making the request and the resource that is created.

The closest connection is the audit log created by AWS CloudTrail that can show which user made each request. But this is not related to billing information.

If you wish to track costs, you should associate tags with resources. These tags could be based on department, cost center, person, etc. You can then configure your Detailed Billing Report to provide cost breakdowns by tag.



来源:https://stackoverflow.com/questions/44495727/how-to-view-aws-billing-cost-for-resources-created-by-an-iam-user

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