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 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南