localstack / localstack/serverless-localstack
Golang function triggers "no such file or directory" when mountCode -> True
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 542
- Forks
- 92
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the serverless invoke command with mountCode enabled, event.json, and the Go binary at /var/task/bin/adaptor-k8s; compare it with the working mountCode-disabled case. Trace the plugin's mountCode handling and verify that invoking the function no longer reports the fork/exec "no such file or directory" error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100