Nested quires for cloud insights

0

I have two queries to run aws lambda cloud watch logs. The first query returns me the requestId of lambdas based on the condition used. fields @requestId |filter objectType=“filter-keyword" I want to use the requestId's returned by the above query to check lambda average duration for those request id's only.

filter @type = "REPORT" | stats avg(@duration), max(@duration), min(@duration) by bin(5m)

Is it possible to achieve this in same query? does cloud watch insight query support nested queries?

1 Respuesta
1

Hello,

I would like to mention that currently Logs Insights query does not support nested queries.

We already have an internal feature request for the same and I have gone ahead and associated this query to it in order to further escalate this feature. However please note that I cannot provide you with an ETA as to when this will be available.

As a possible workaround you can achieve this by programmatically running insights queries using StartQuery/GetQueryResults APIs[1][2] via custom code/script.

I hope you find the above information useful.

Stay safe and have a nice day

References:

[1] https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html [2] https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetQueryResults.html

AWS
INGENIERO DE SOPORTE
respondido hace un año

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