I have a Lambda function which is scheduled to run once every 24 hours. I also have a CloudWatch alarm if the number of invocations drop below 1 every 24 hours.
The issue here is that the invocation metric doesn't always show up in time for when the alarm condition is being evaluated. As a result, I have 0 invocations for a brief duration for the sliding window of 24 hours (the alarm evaluation period). This results in the alarm changing its state, only to recover within 1 minute, since the metric is now available to be evaluated.
Now all of this could have been easy to tackle if CloudWatch supported evaluation periods greater than 24 hours, but alas, it doesn't. How do I tackle this situation?
Am I approaching this problem correctly? If so, then how do I work around this CloudWatch limitation without introducing unnecessary complexity?