AWS Cloudwatch + alarm period less than 10 seconds?

88 Views Asked by At

I have a lambda function that triggers some API data conversions; 99.99% of the time works fine, but sometimes it times out because the requested API didn't respond in time, etc...

My lambda function saves logs via HTTP to my Axiom account, but not the timeouts because the lambda function gets terminated, so I can't log that to Axiom...

Axiom offers a lambda integration, but it doesn't log as I want, and that's why I'm using HTTP integration in the lambda with Axios.

So what I did in order to sort out this is configure an alarm in Cloudwatch to listen to the "Time out" event and an alarm when that event reaches the threshold of 1 (I want all the timeout logs).

My solution works. I get the logs to my Axiom account, but the problem is that the alarm minimum Period is 10 seconds, which means if two timeouts happen simultaneously or in the 10 window gap, I will only get one "alarm," so only one event will be registered...

I tried to reduce the number to 1 second but I got the error: There was an error while creating your alarm Period must be 10, 30, or a multiple of 60

So I'm wondering if I'm doing something wrong or I'm just using the wrong product for this... Any ideas?

0

There are 0 best solutions below