Uptime monitoring for AWS Lambda and API Gateway
AWS Lambda behind API Gateway (or Function URLs) is a common indie API stack: pay per invoke, scale automatically, no server to patch. CloudWatch tells you about your function errors; it does not give customers a status page link, and a cold start is not the same as an outage — external monitoring needs a health URL that separates “slow first hit” from “API unreachable.”
StillOnline runs scheduled HTTP GET checks from outside AWS, hosts a status page, and alerts you through the StillOnline Telegram bot, Slack, or email when checks fail.
Quick answer
AWS Lambda behind API Gateway or a Function URL should expose GET /health returning 200 when the function can respond — keep the handler minimal to limit cold-start noise. Register the public HTTPS URL in StillOnline; Free includes one project, one URL, and five-minute checks (pricing). Share stillonline.tech/s/... with API consumers and connect owner alerts via the StillOnline bot.
Cold start vs real outage
Lambda cold starts can add seconds to the first request after idle. StillOnline treats timeouts and non-200 as down — design /health accordingly.
| Symptom | Likely cause | Action |
|---|---|---|
| Red check once, then green | Cold start | Minimal handler; optional provisioned concurrency if SLA demands it |
| Red for several intervals | Deploy bug, IAM, or API Gateway route | Fix function; post incident on status page |
| 502/503 from API Gateway | Integration or throttling | Not a “warmup” — real outage for customers |
| Health does heavy DB work | Slow every probe | Lightweight liveness; DB checks on /ready — health design |
StillOnline does not distinguish cold start inside the probe — your health route should return 200 quickly when the stack is healthy.
What to put in the health URL
Good serverless health handlers:
- Return
{ "status": "ok" }with 200 - Avoid auth on
/healthonly - Skip secrets in response body
- Optional: cheap DynamoDB
GetItemor RDS ping only if “up” means “database reachable”
curl -sS -o /dev/null -w "%{http_code}\n" https://api.example.com/prod/health
Use the same stage and custom domain integrators call — not the raw execute-api URL if customers never see it.
For API-only products: API-only SaaS checks.
Step 1 — Register in StillOnline
- Sign in.
- New project → product name.
- HTTP check → API Gateway or Function URL +
/health, GET, 200, five-minute interval (Free). - Status page in developer docs — public status page guide.
Step 2 — Owner alerts
Lambda will not page you. Settings → Connect Telegram → StillOnline bot → Start — Telegram guide.
Free: one owner channel. Pro / Ultimate: all three — pricing.
AWS free tier limits (Lambda invocations, API Gateway) are separate from StillOnline tiers — budget both for a solo API.
Related guides
FAQ
Does StillOnline invoke Lambda on every check?
Yes — each StillOnline probe is an HTTP GET to your health URL, which counts as a Lambda invocation per AWS billing docs. A minimal /health keeps cost low; five-minute interval on Free is usually fine for indie APIs.
Should I use API Gateway stage URL or custom domain in StillOnline?
Register the HTTPS hostname API customers use in documentation. If that is a custom domain, monitor that — not an internal stage URL they never see.
Can StillOnline detect Lambda cold starts separately from outages?
No. If cold starts flip checks red too often, slim down /health, increase Lambda memory, or use provisioned concurrency — StillOnline reports pass/fail on HTTP only.