doujiene2845 2019-05-17 08:07
浏览 234

使用AWS SAM 3秒后AWS Lambda函数超时-GoLang

I am new to AWS and GoLang and I am trying to execute my Lambda function via AWS SAM cli. But everytime 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:

I did not want to copy information I pass in the HTTP request since its sensitive.

Any idea how I can modify this 3 second timeout?

  • 写回答

2条回答 默认 最新

  • dongtangu8403 2019-05-17 08:38

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
  • doucheng9634 2019-05-17 21:10

    The default timeout of Lambda functions is 3 seconds. You can set any value by updating the Timeout property in your SAM template, e.g.

      Type: AWS::Serverless::Function
        CodeUri: .
        Handler: index.handler
        Runtime: nodejs10.x
        Timeout: 10



  • ¥15 报错问题,只有两个错误,如图片所示,i多次初始化
  • ¥15 matlab runtime 如何收费
  • ¥20 用C语言绘制cs1.6方框透视 出现了点问题 绘制不上去 矩阵数据 和敌人坐标都是正确的
  • ¥15 Tpad api账户 api口令
  • ¥30 ppt进度条制作,vba语言
  • ¥15 生信simpleaffy包下载
  • ¥15 请教一下simulink中S函数相关问题
  • ¥15 在二层网络中,掩码存在包含关系即可通信
  • ¥15 端口转发器解析失败不知道电脑设置了啥
  • ¥15 Latex算法流程图行号自定义