Follow dba-ninja.com

Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions

dba-ninja.com Links

Dba_db2_button

Sqlserver_dba_button

Task timed out after 3.02 seconds aws lambda

01 May,2024 by Rambler

Question: I'm getting this error message when Invoking a Lambda function . How can I fix?

{
"errorMessage": "2022-04-29T12:13:13.402Z a7918215-28a1-45d0-99b2-xvsbeue987hj Task timed out after 3.02 seconds"
}

 

Answer:  You can make this change through the AWS Interface or AWS CLI

Using the AWS Interface to change the Lambda function Timeout value

1) Go to the AWS Console and Navigate to the Lambda Console.   You can type "Lambda" into the Search box

2) Click on your Lambda function name that relates to the error message

3) Select Configuration section and then select General Configuration. Click Edit

4) Change the Timeout Value as needed. A good starting point might be 3 minutes - although this will depend on the Lambda requirements 

5) Waiting for the Function to be successfully updated before invoking again 

Using AWS CLI to change the Lambda function Timeout value

--view the current timeout value 

aws lambda get-function-configuration --function-name my_lambda_function --query "Timeout"

--change the timeout value 

aws lambda update-function-configuration --function-name my_lambda_function --timeout 602

 


Author: Rambler (http://www.dba-ninja.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on Task timed out after 3.02 seconds aws lambda


dba-ninja.com