AWS CUR 2.0 resource tags

Hello! We are looking to migrate our AWS Cost and Usage report to the new 2.0 and I am having problems with filtering on the resource tags in Quicksight. I believe that the new “resource_tag” field is a mapping and it cannot split each cost tag properly. I am not sure the best way to make this happen but hoping there is. Here is the output of the field if that helps work me through the answer.

Imported field name: resource_tags
Type: string
Value: {user_environment=env_name, user_name=resource_name, user_billing=billing_name, user_group=group_name, user_app=app_name}

Hi @Adam_Herman,

Welcome to the community and thanks for asking your question.

Have you looked at using the split function to return the different tags based on an index? See also this community question.

Many Thanks,
Andrew

Hey Andrew,

Yea I tried that but worried that the X position may not always be the same tag. Example is some of the resources may not have the “Name” tag so then all of the other fields will be off. I tried to look through the available functions to loop through all items in the “split” but didn’t find anything that might work.

Hi @Adam_Herman,

I’ve checked the CUR 2.0 documentation which states that the resource_tags column is a map column of key-value pairs.

The keys of this column can be queried as individual columns using the dot operator, an example of how to use this is given here which would allow you to select and return the columns you want to report on using Custom SQL, e.g.:

SELECT resource_tags.user_environment FROM COST_AND_USAGE_REPORT

Would taking this approach provide a suitable solution?

Many Thanks,
Andrew

Hey Andrew,

I found that the cleanest way to do this was to follow this guide to get the Cloud Intelligence Dashboards (CUDOS Framework) installed: Workshop Studio

Once that was done I could then edit the views from Athena using this guide: Workshop Studio

The last piece was to refresh the dataset within Quicksight since I didn’t want wait for tomorrow to see the tags. Once that was done I could now filter on the tags.

Thanks for your help,
-Adam

1 Like