Monitor Scheduled AWS Lambda Functions
A Lambda on an EventBridge schedule can stop running for reasons that never show up as a Lambda error — a disabled or deleted EventBridge rule, a resource policy change, or a throttled account. A ping at the end of the handler, after the real work succeeds, catches all of these the same way.
Setup
Create an incoming monitor
Add a heartbeat monitor in Pingtastic matching the EventBridge schedule expression, with a grace period a bit past the expected invocation time.
Ping at the end of the handler
After the function's work completes successfully, call the ping URL before returning.
exports.handler = async (event) => {
// ...existing job logic...
await fetch('https://ping.pingtastic.net/ping/nightly-export');
return { statusCode: 200 };
};Gotchas
- ⚠An EventBridge rule can be disabled (manually, or by an IaC deploy that recreates it in a disabled state) without the Lambda function itself showing any error — CloudWatch Logs stay empty because the function is simply never invoked. A missed ping is often the first real signal.
- ⚠If the function times out before reaching the ping call, no ping fires — make sure the Lambda timeout setting leaves enough headroom for the real work to finish and still reach the ping request.
Questions
Does CloudWatch already alert me if a scheduled Lambda stops running?
CloudWatch alarms can watch invocation count, but that requires you to already suspect the problem and set one up per function. A heartbeat ping is a simpler, single mechanism that alerts by default whenever the function stops succeeding, for any reason.
Does this work with EventBridge Scheduler as well as the older EventBridge Rules?
Yes — the pattern is the same either way, since the ping is placed inside the Lambda handler itself, independent of which EventBridge feature triggers it.
Start monitoring your AWS scheduled lambda
Set up your first monitor in under five minutes.
Get started — $5/month