Errors / checked October 9, 2026
Task timed out after 3.00 seconds
The error
The error from an AWS Lambda function that ran longer than its configured timeout, in its CloudWatch logs and the invocation result. The number is the function's timeout: 3.00 seconds is the default. Common for functions started on a schedule by EventBridge Scheduler or an EventBridge rule.
Quick fix
- Raise the function's timeout in its configuration (console, CLI or your infrastructure code). The default is 3 seconds; it can go up to 900 seconds (15 minutes).
- If it times out on cold starts only, the Init phase is too slow for the timeout: move heavy setup out of the init code or give the function more time. AWS documents that a suppressed init can use up a short timeout.
- Find where the time goes: a network call with no timeout of its own, a database connection that waits, or a loop that grows with your data. Put timeouts on outbound calls so the function fails with a clear error instead.
Why this happens
Lambda stops a function when it reaches its configured timeout and reports "Task timed out after N seconds". With the default of 3 seconds, any scheduled job that waits on a slow API or database hits this quickly.
Source: AWS Lambda: troubleshoot invocation issues (Init phase timeout)
Other solutions
- For asynchronous invocations, Lambda by default runs a function that returned an error two more times, one minute and then two minutes later. Make the job safe to repeat.
- Work that can run longer than 15 minutes needs to be split across invocations or moved off Lambda.
- If the scheduled job only calls a URL, a scheduler can call it directly without a function in between. RunLater calls the URL on your cron schedule, waits up to 5 minutes for a response, retries a failed call up to 10 times with exponential backoff, and emails you when a run fails after its retries.
Check a schedule before you deploy it: the cron expression explainer shows the next 10 run times.
Frequently asked questions
What is the default Lambda timeout?
3 seconds. You can raise it in 1-second steps up to 900 seconds (15 minutes).
Does Lambda retry a function that timed out?
For asynchronous invocations, Lambda runs a function that returned an error two more times by default, waiting one minute and then two minutes. You can change this with the function's asynchronous invocation settings.
Why does it only time out on the first call after a while?
That is usually the Init phase of a cold start. If Init times out, Lambda re-runs it on the next invoke, and with a short timeout that can time out again or leave too little time for the handler.
Have the URL called on schedule, with retries
RunLater calls your URL on a cron schedule or at an exact time, in your timezone, retries failed calls with backoff and logs each response, so a timeout or a 5xx shows up in a log instead of disappearing.