Lambda 'Task timed out after 3.00 seconds' Error

Share
Ongoing Lambda Updated November 13, 2026Based on 4 user reportsHow we research

Quick answer

The default Lambda timeout is 3 seconds. Raise the timeout, add memory (more CPU) and cut slow initialization or network waits.

Most likely fix: Increase the timeout

How to fix it

Try these in order — the most common fix is first.

  1. 1. Increase the timeout

    1. Lambda > function > Configuration > General configuration > Edit > Timeout
    2. Maximum is 15 minutes
    Did this fix it?
  2. 2. Increase memory

    1. Same screen: raise Memory; CPU scales with it
    Did this fix it?
  3. 3. Optimize initialization

    1. Move heavy imports and client creation outside the handler
    2. Reduce package size
    Did this fix it?
  4. 4. Check network path

    1. VPC functions need a NAT gateway (or VPC endpoints) to reach the internet or AWS APIs
    2. Check security groups and timeouts to the database
    Did this fix it?
  5. 5. Use CloudWatch logs to find the slow step

    1. Add timing logs; compare Init Duration and Duration in the REPORT line
    Did this fix it?

Symptoms

Logs show 'Task timed out after 3.00 seconds' and the invocation fails.

Why it happens

  • Timeout left at the default 3 seconds
  • Slow init code or large dependencies
  • Too little memory/CPU
  • Function in a VPC with no route to the internet (NAT) calling external services
  • Slow downstream database or API
  • Unsettled promises in async handlers

This guide also covers

  • lambda task timed out after 3.00 seconds
  • aws lambda timeout
  • lambda function timeout error
  • lambda sandbox timedout

Still not working?

If AWS keeps failing, you're not alone. See every AWS problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us
Fixed it? Share this guide

The same problem in other apps

All not loading, error messages & connection guides →

Other AWS errors

All 11 AWS errors and fixes →