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"
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.
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.
I have same error - increasing the timeout resolved it:
In the AWS Management Console:
lambda function -> configuration -> General configuration -> Edit Timeout
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With