-
Notifications
You must be signed in to change notification settings - Fork 7
cannot execute binary file #1
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
Comments
Hi @zerkowsm, thanks for reaching out. Unfortunately I can't reproduce the error - I just retried with a fresh version of the repo and it is working as expected on macOS. Can you confirm that the build.sh worked and check the resulting runtime.zip file if the file permissions are correctly set? Do you see any additional information in the logs (e.g. an error code)? |
Hello @maschnetwork Thanks for the update!
But still getting the same error which is followed by: But, I run it on a different machine and it worked (?!). The only difference I can see is the chip M1 (the one I struggle) vs i7 (working fine) is that is something that can affect the provisioning in any way (build is done in a container anyway)? |
Hello again, It is not provisioning, it's build. Dockerfile yum depends on the underlining architecture and on aarch64, installed package is: |
Hi @zerkowsm, thanks a lot for reproducing the issue.
and let me know if that works on the M1? Best, |
Np, sure! It helped, builds ends with the warning confirming what happened: Thanks for the hint here! BTW: I was wondering if some other tweaks would also help here - to match the platform --platform=linux/arm64/v8 with the function config: I was also thinking about extracting jre18-slim together with the bootstrap as a Function Layer - layer.zip:
dist is just the jre18-slim but I have some doubts what to put in bootstrap file. I assume I would need to find substitute for path prefix used in current setup (runtime.zip having everything together) - |
I'm glad we could resolve the issue - I'll fix the Dockerfile to support it out of the box. Yes you can definitely do that and also use the arm architecture, but I would not make that automatically dependend on the platform you are building because you might still want to deploy it to another architecture. For having a custom runtime on a layer you can find an example here: https://github.com/msailes/lambda-java17-layer |
Added the platform to the Dockerfile. Closing the issue now. Thanks for reporting and reproducing! |
Thanks! |
Hello there!
This is really good stuff!
I have an issue while trying it - apparently missing some setup... I have just tried it and getting
{"message": "Internal server error"}
as an outcome from executing./provision-infrastructure.sh
with detailed CloudWatch error as below:/var/task/bootstrap: line 4: /var/task/jre18-slim/bin/java: cannot execute binary file
Running
./provision-infrastructure.sh
on macOS, if that matters.Can you please advice what do I miss here?
The text was updated successfully, but these errors were encountered: