lambda task timed out after 30 seconds code example
Example: task timed out after 3.00 seconds aws lambda python
The default value for timeout in Lambda is 3 seconds = 3000 microseconds.
Go to Advanced settings and add 5 min.
This could be the only issue, if the timeout happens exactly at 3 seconds.
All other errors would take something more or less than that.