Reputation: 87
I am using Lambda web adapter to run a Image from AWS-ECR. I am getting the below error during invocation. When this error is encountered, Lambda is invoked again.
EXTENSION Name: lambda-adapter State: Ready Events: []
INIT_REPORT Init Duration: 668.11 ms Phase: init Status: error Error Type: Runtime.ExitError
My lambda is invoked and ran twice, the first one with the Init Phase Error. My binary is a compiled go app and the docker file content is as below:
FROM public.ecr.aws/lambda/provided:al2
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.7.1 /lambda-adapter /opt/extensions/lambda-adapter
COPY main /main
ENTRYPOINT [ "/main" ]
Note that INIT_REPORT error is logged after my app execution ended.
Any help resolving this is appreciated. Please reply for questions.
Edit/Update: My function returns in less than 10 seconds as it is expected. After this I no longer want to run the app. In Init Phase Lambda tries to run this and since the execution completes, it returns and this is the cause of this error.
Now I would want a way to run the app that is triggered by a cron schedule, only once, Init Phase or Invoke Phase doesn't matter.
Upvotes: 1
Views: 1855
Reputation: 57
This error means your go app crashed. You need to find out why. Could you enable debug logs for you go app? And post the logs here.
Upvotes: -1