使用 AWS SAM 3 秒后 AWS Lambda 函数超时 [英] AWS Lambda function Timedout after 3 sec using AWS SAM
问题描述
我是 AWS 和 Go 的新手,我正在尝试通过 AWS SAM CLI 执行我的 Lambda 函数.但每次我尝试这样做时,我都会收到以下错误:
I am new to AWS and Go and I am trying to execute my Lambda function via AWS SAM CLI. But every time I try to do so I get the following error:
I0517 07:51:11.052078 13 main.go:62] Thumbnail Lambda successfully started
I0517 07:51:13.696304 13 utils.go:99] Needed directories successfully created
2019-05-17 09:51:14 Function 'Thumbnail' timed out after 3 seconds
2019-05-17 09:51:14 Function returned an invalid response (must include one of: body, headers or statusCode in the response object). Response received:
我不想复制我在 HTTP 请求中传递的信息,因为它很敏感.
I did not want to copy information I pass in the HTTP request since its sensitive.
知道如何修改这个 3 秒超时吗?
Any idea how I can modify this 3 second timeout?
推荐答案
我正在使用 template.yml
来设置我的 lambda.当我向它引入 Timeout
属性时,我忘记重新构建和重新运行 sam local start-api
.诚实的错误,感谢您的时间.
I am using template.yml
in order to set up my lambda. I forgot to re-build and re-run sam local start-api
when I introduced Timeout
property to it. Honest mistake, thank you for your time.
这篇关于使用 AWS SAM 3 秒后 AWS Lambda 函数超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!