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
This is only a preview. Your comment has not yet been posted.
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.
Posted by: |