Docs › AWS Lambda with EventBridge Scheduler with RunVouch

AWS Lambda with EventBridge Scheduler with RunVouch

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

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

What RunVouch detects

AlertWhat it means here
MISSEDcadence plus grace passed and no run started
FAILEDnon-zero exit or a reported failure, with the stderr excerpt
NO_EVIDENCEthe run said ok but the file, URL or assertion you required is missing
STALLEDa run started and never ended within max runtime
RETRY_STORMthe same tool called with identical input many times in one run
BUDGET_RUN / BUDGET_DAYcost cap crossed; the agent is paused until you resume it
DRIFTduration or output size far off its 7-run baseline

Need a key? Get a free key · Stuck? contact