Anyone know how to get insight into apigateway latency? The default cloudwatch logs setup for the httpApi show responseLatency as 0 when the authorizer fails, and the authorizer obviously took time to process and I want to know how long a request took from apigw -> authorizer -> integration -> response.
I have not tried xray I have it turned off currently, but ideally I want to set this up as monitoring for a production setting. Currently routes showing a 0ms time for response throws off what the actual user experience is.
Garret Harp
08/09/2021, 4:03 PM
It seems it shows responseLatency 0 whenever the authorizer does not get called because theres no Authorization header set, but it still takes time for the response because of API gateway which I would like to know.
Whenever I do have an auth header set that is invalid it shows a response time of 433ms when actual response time was 704ms.
Though I am not entirely sure how it gets the responseLatency value because the authorizer took 283ms (173ms cold start + 110ms duration) and since the authorization was invalid it wouldnt call my lambda.