Prompt
How do I find logs for a serverless function that failed?
Latest observation
Oct 16, 2026
OpenAI APIWeb search: off
To find logs for a failed serverless function, the exact steps depend on the platform you’re using, but the general approach is:
1) Go to your cloud provider’s logging service
Common places:
- AWS Lambda → CloudWatch Logs
- Google Cloud Functions / Cloud Run → Cloud Logging
- Azure Functions → Application Insights or Log Stream
- Vercel / Netlify / Firebase / Supabase → their platform dashboard logs
2) Find the specific function invocation
Look for:
- Timestamp of the failure
- Request ID / execution ID / correlation ID
- Function name
- Error message / stack trace
If the function was invoked by an event source (API Gateway, queue, cron, etc.), check the source event logs too.
3) Search around the failure time
If you don’t know the request ID, search logs by:
- exact time window
- function name
ERROR,Exception,Traceback,panic, etc.
4) Check the function’s runtime logs
Useful things to inspect:
- cold start / init errors
- timeout messages
- memory limit exceeded
- permission / IAM errors
- missing env vars / config
- dependency/import failures
5) If the platform supports structured logs, use filters
Examples:
- request ID
- severity level
- status code
- custom fields like
userId,jobId,orderId
6) If no logs appear
Possible reasons:
- logging not enabled
- function failed before logger initialized
- permissions prevent log writes
- logs are in a different region/account/project
- retention policy already deleted them
If you tell me which platform you’re using (AWS, Azure, GCP, Vercel, etc.), I can give you the exact clicks or commands to find the logs.