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
已提问 4 年前596 查看次数
1 回答
0
已接受的回答

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
已回答 4 年前

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

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

回答问题的准则