Lambda init phase timeout with provided.al2 runtime golang

0

I have a working lambda with sqs trigger in go1.x runtime and trying to deploy same to new provided.al2 runtime using steps described in this page https://docs.aws.amazon.com/lambda/latest/dg/golang-package.html

steps used:

  1. GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -tags lambda.norpc -o bootstrap main.go
  2. zip main.zip bootstrap
  3. aws lambda create-function --function-name test-go-al2 --runtime provided.al2 --handler bootstrap --architecture x86_64 --role <role_arn> --zip-file fileb://main.zip
  4. Enabled sqs trigger

After deploying function, it keeps emitting the log INIT_REPORT Init Duration: 10009.73 ms Phase: init Status: timeout

Am I missing anything else here?

madhuv
已提问 9 个月前1239 查看次数
1 回答
1

Hello everyone,

I had a similar problem with timeouts, but when I upgraded aws-lambda-go and aws-sdk-go to their latest versions, everything started working correctly!

Cheers!

已回答 8 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则