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
demandé il y a 4 ans595 vues
1 réponse
0
Réponse acceptée

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
répondu il y a 4 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions