Docs › AWS Lambda scheduled function monitoring with RunVouch
AWS Lambda scheduled function monitoring with RunVouch
AWS Lambda scheduled function monitoring without writing CloudWatch alarms: CloudWatch can alarm on errors and on invocation count, if you build those alarms. It cannot tell a function that returned in 200 ms because a feature flag was off from one that did the work.
- How it runs on AWS Lambda + EventBridge Scheduler
- Store the key
- Report the run (two HTTP calls)
- Register the cadence and caps
- What goes silent on AWS Lambda + EventBridge Scheduler
- What AWS Lambda + EventBridge Scheduler does not tell you
- What RunVouch detects
- Set up in two minutes
- Also running cloud functions?
How it runs on AWS Lambda + EventBridge Scheduler
Inside the handler, with the two HTTP calls (no binary needed). Python: pip install runvouch into the deployment package and use runvouch.vouch() as a context manager; any language: plain HTTPS.
Store the key
Put the key in Secrets Manager or SSM Parameter Store and read it at cold start, or as an encrypted environment variable on the function.
Report the run (two HTTP calls)
import os, runvouch
runvouch.agent("nightly-report", cadence_s=86400, grace_s=1800, evidence_required=True)
def handler(event, context):
with runvouch.vouch("nightly-report", evidence=lambda: {"s3_object": wrote_object}) as run:
wrote_object = build_report() # your work
run.tool("bedrock.invoke", {"model": "anthropic.claude-3"}, cost=0.02)The start call returns run_id; the end call takes status (ok or fail), optional cost and tokens, and evidence as a JSON object of booleans. Full reference on the API page.
Register the cadence and caps
rv agent nightly-report --cadence 24h --grace 30m --max-runtime 1h --evidence --cap-run-cost 2
Register the agent once, from anywhere with the key. Cadence is what turns a schedule that stopped into an alert; --evidence makes a run without evidence a failure; the caps pause the agent when it overspends.
What goes silent on AWS Lambda + EventBridge Scheduler
- A disabled or deleted schedule stops invocations; without a custom alarm on
Invocations == 0nobody notices. MISSED notices. - Timeouts show as errors, but a function that catches everything and returns
{"ok": true}is a success to Lambda. Evidence is what separates the two. - Retries (asynchronous invocation retries twice by default) can triple an LLM bill; the per-run cost cap and retry-storm detector see them as one agent.
What AWS Lambda + EventBridge Scheduler does not tell you
EventBridge Scheduler counts invocations and failed invocations as metrics; nothing alerts unless you create a CloudWatch alarm per schedule, and an alarm on Invocations == 0 needs the TreatMissingData setting right or it stays green on silence. A disabled schedule, a schedule whose IAM role lost lambda:InvokeFunction, or a function that catches every exception and returns 200, all look like success or like nothing at all.
What RunVouch detects
| Alert | What it means here |
|---|---|
| MISSED | cadence plus grace passed and no run started |
| FAILED | non-zero exit or a reported failure, with the stderr excerpt |
| NO_EVIDENCE | the run said ok but the file, URL or assertion you required is missing |
| STALLED | a run started and never ended within max runtime |
| RETRY_STORM | the same tool called with identical input many times in one run |
| BUDGET_RUN / BUDGET_DAY | cost cap crossed; the agent is paused until you resume it |
| DRIFT | duration or output size far off its 7-run baseline |
Set up in two minutes
- Get a free key (3 agents, no card) and store it where this page says.
- report the run (two http calls): copy the snippet above into the scheduled job.
- Register the cadence once:
rv agent nightly-report --cadence 24h --grace 30m --evidence, or let the first run create the agent and set the cadence on the dashboard. - Send one test alert:
curl -X POST https://api.runvouch.com/v1/settings/test-alert -H "X-API-Key: $RUNVOUCH_KEY". The next missed, failed or empty run reaches the same channels.
Also running cloud functions?
Google Cloud Scheduler. Azure Functions timer trigger. Cloudflare Workers Cron Triggers. Vercel Cron Jobs. The full list of runtimes is on integrations, and the same agent can report from several of them: one job, one cadence, wherever it happens to run.
Need a key? Get a free key · Stuck? contact