How to reliably calculate ARN from Cost and Usage Report columns

1

We are working on building an automated parser which can read AWS Cost and Usage reports and link cost entries to respective resources. We are trying to go past two challenge -

  1. CUR doesn't provide a column for resource ARN directly
  2. If we want to calculate it ourselves, one missing info is the resource type against each service Does anyone know why these information are not included in CUR and if there is a reliable way to construct ARN from already available columns? Any info would be appreciated. Thanks.
已提问 1 年前576 查看次数
1 回答
0

Hello Atanu Roy,

Thank you for reaching out to us. Let me help you with your queries :

  1. CUR doesn't provide a column for resource ARN directly.

A : The Cost and Usage report does have a direct coloumn that will get you the resource ARN directly. Its called line_item_resource_id. While you created CUR first, you should click on the check box that states : include resource ids for it to show up in your CUR.

You can create a new CUR report with this feature enabled so that you can see the Resource ARN's directly. Please use document : Creating Cost and Usage Reports

profile pictureAWS
已回答 1 年前
profile picture
专家
已审核 1 个月前
  • Hi Nithin,

    Thank you for responding. We have already enabled that option. However, in the format we get (we are using text/csv) there are no line_item_resource_id column. Instead we get a column named lineItem/ResourceId which only contains the resource id part (not the full ARN separated by : characters). Can you please help me out if we are missing something in the configuration?

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则