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
preguntada hace 4 años597 visualizaciones
1 Respuesta
0
Respuesta aceptada

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
respondido hace 4 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas