Skip to content
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

Golang function triggers "no such file or directory" when mountCode -> True #129

Open
kmai opened this issue Jan 26, 2021 · 2 comments
Open

Comments

@kmai
Copy link

kmai commented Jan 26, 2021

I'm trying to invoke a function locally using localstack and a Golang binary as a handler.

If I mount the directory (mountCode: True), I get the following message when doing the invoke:

# serverless invoke --function hello -p event.json
Serverless: Using serverless-localstack
{
    "errorMessage": "RequestId: b669e3f0-8ff3-1b84-748d-066ac5b8578e Error: fork/exec /var/task/bin/adaptor-k8s: no such file or directory",
    "errorType": "exitError"
}

If I set mountCode: False, the function works without issues.

@whummer
Copy link
Member

whummer commented Feb 20, 2021

Thanks for reporting @kmai . Can you please share some details about your LocalStack configuration? Please note that Lambda code mounting requires the LAMBDA_REMOTE_DOCKER and HOST_TMP_FOLDER environment variables to be configured properly - see here: https://github.com/localstack/localstack#using-local-code-with-lambda Please keep us posted how it goes, thanks!

@ptrhck
Copy link

ptrhck commented Jun 3, 2022

Could this be related to localstack/localstack#6181, where the mount overrides files within the container?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants