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
posta 4 anni fa597 visualizzazioni
1 Risposta
0
Risposta accettata

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
con risposta 4 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande