← Blog

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.

SymptomLikely causeAction
Red check once, then greenCold startMinimal handler; optional provisioned concurrency if SLA demands it
Red for several intervalsDeploy bug, IAM, or API Gateway routeFix function; post incident on status page
502/503 from API GatewayIntegration or throttlingNot a “warmup” — real outage for customers
Health does heavy DB workSlow every probeLightweight liveness; DB checks on /readyhealth 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 /health only
  • Skip secrets in response body
  • Optional: cheap DynamoDB GetItem or 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

  1. Sign in.
  2. New project → product name.
  3. HTTP check → API Gateway or Function URL + /health, GET, 200, five-minute interval (Free).
  4. Status page in developer docs — public status page guide.

Step 2 — Owner alerts

Lambda will not page you. SettingsConnect TelegramStillOnline botStartTelegram 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.