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 年前檢視次數 614 次
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?

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南