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
asked 8 months ago1201 views
1 Answer
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!

answered 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions