简体   繁体   English

AWS Lambda “errorMessage”:任务在 3.00 秒后超时

[英]AWS Lambda “errorMessage”: Task timed out after 3.00 seconds

Lambda function showing the below error in test when changing file format from png to text Lambda function 在将文件格式从png更改为text时在测试中显示以下错误

"errorMessage": "2020-07-17T07:06:45.969Z b66dd037-ba01-4025-97db-6527b486eac8 Task timed out after 3.00 seconds"

I have same error - increasing the timeout resolved it:我有同样的错误 - 增加超时解决了它:

In the AWS Management Console:在 AWS 管理控制台中:

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

在此处输入图像描述

The default Lambda timeout is 3 seconds.默认的 Lambda 超时为 3 秒。

To resolve this do one of the following:要解决此问题,请执行以下操作之一:

  • Increase the timeout of your Lambda function, it can be upto 15 minutes .增加 Lambda function 的超时时间,最长可达 15 分钟 The recommendation would be to set it to the duration of how long you anticipate it will take.建议将其设置为您预计需要多长时间的持续时间。
  • Increase the resources (memory/CPU) so that your function is quicker at performing its target action.增加资源(内存/CPU),以便您的 function 更快地执行其目标操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM