-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"no such file or directory" when executing Go function in AWS Lambda #4710
Comments
Ok, found a solution. If someone else will have this issue: somehow Golang Alpine images doesn't build statically linked binary: The interpreter doesn't exist in Lambda environment so that's why it throws "no such file or directory error". To solve that modify your Makefile to use |
It also does not like C header includes, where the non alpine image works just fine. |
this worked for me
|
@gadelkareem , where did you add this ? I am using helloworld example of AWS SAM. |
@rajendragosavi it for the Alpine image that is building the go binary in your pipeline |
@gadelkareem , I am just following AWS SAM hello-world example. and I am getting some error . |
@Napas - How did you resolve this issue? I am following AWS SAM hello-world example and I getting error- "errorType":"exitError","errorMessage":"RequestId: 1bd9d3cd-442a-1519-3878-8ebe490a5e95 Error: fork/exec /var/task/hello-world: permission denied" |
i am using lambda promtail function with go latest version but getting the following error: |
Same issue, did you manage to fix it? |
no,
thanks
dheeraj
…On Tue, Jan 4, 2022 at 9:02 PM Amadej Kastelic ***@***.***> wrote:
i am using lambda promtail function with go latest version but getting the
following error: fork/exec /var/task/handler: no such file or directory:
PathError null
Same issue, did you manage to fix it?
—
Reply to this email directly, view it on GitHub
<#4710 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARPCIOIVY2P7V357YEDRV53UUMHJNANCNFSM4EO7K5RQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
is this fixed? Even I'm facing the same error. |
So another cause of this is failing to build the go binaries before using serverless to deploy the lambdas - at least in our case, sls would happily deploy lambdas with the supporting files in the zip, but not including the executable, so the "no such file or directory" error was quite literal - the file wasn't there... |
When running my Lambda function I get this error:
START RequestId: 3df5e64a-0863-11e8-903f-919b29535603 Version: $LATEST fork/exec /var/task/bin/ping: no such file or directory: PathError null END RequestId: 3df5e64a-0863-11e8-903f-919b29535603 REPORT RequestId: 3df5e64a-0863-11e8-903f-919b29535603 Duration: 0.21 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 12 MB
I did check zip file in S3 - it has an executable in it ./bin/ping
Any ideas how to solve that?
My serverless.yml
my ping/main.go file:
The text was updated successfully, but these errors were encountered: