Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Lambda "errorMessage": Task timed out after 3.00 seconds

Tags:

Lambda function showing the below error in test when changing file format from png to text

"errorMessage": "2020-07-17T07:06:45.969Z b66dd037-ba01-4025-97db-6527b486eac8 Task timed out after 3.00 seconds" 
like image 743
eagletech Avatar asked Jul 17 '20 07:07

eagletech


People also ask

Why is my Lambda function timing out after 3 seconds?

The default timeout of a Lambda function is three seconds. This means, if you don't explicitly configure a timeout, your function invocations will be suspended after three seconds. Now, if you call a few services, some of which are currently at capacity, a request can very well take a second on its own.

Why is my Lambda function timing out?

There are three reasons why retry and timeout issues occur when invoking a Lambda function with an AWS SDK: A remote API is unreachable or takes too long to respond to an API call. The API call doesn't get a response within the socket timeout.


1 Answers

I have same error - increasing the timeout resolved it:

In the AWS Management Console:

lambda function -> configuration -> General configuration -> Edit Timeout 

enter image description here

like image 181
Justin J Avatar answered Oct 24 '22 03:10

Justin J