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.
asked 10 months ago492 views
1 Answer
-1

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
answered 10 months ago
  • 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?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions