Athena + CUR report - resources created in the last week?

0

How can a list of resources that were created in the last week be generated? Is it something that can be done with Athena + CUR (like https://aws.amazon.com/blogs/aws-cost-management/querying-your-aws-cost-and-usage-report-using-amazon-athena/?, but taking into account resources generating spend in the last week and resources that were generating spend before that), but maybe someone already has a query at hand? :)

AWS
asked 3 years ago585 views
1 Answer
0
Accepted Answer

Yeah, I think the potential query could be something like

'select * from cur where min(line_item_usage_start_date) > current_date - 7'

or 

'select distinct line_item_resource_id from cur where min(line_item_usage_start_date) > current_date - 7'

or

select * from cur where line_item_resource_id in ( select distinct line_item_resource_id from cur where min(line_item_usage_start_date) > current_date - 7 )

This should give all resources that are only a week old and all details associated.

AWS
Vivek_S
answered 3 years ago

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