2

I tried bootstraping "Micronaut Function as GraalVM Native Image" example (text guide is here) with cloning the complete example and deploying it into AWS Lambda. On every invocation lambda fails with the same error (from CloudWatch Logs):

Error: fork/exec /var/task/bootstrap: no such file or directory Runtime.InvalidEntrypoint

I checked a ZIP archive with code that was generated by executing ./deploy.sh (which was upload into Lambda function as Function code) and bootstrap file is inside the ZIP file.

Steps to reproduce

I don't have any particular instruction, I simply took the complete example, followed instructions about building a native image and then deployed a builded ZIP-file.

I wonder if it's even possible to deploy Micronaut Serverless function with GraalVM native image or if the feature is broken. I tried to deploy Micronaut Application with GraalVM Native Image (following this guide) and it worked fine to me.

Thanks in advance for any help.

1 Answers1

0

This actually works fine. I had the same problem myself and it ended up being that as I am using Windows, I had the git option to "Checkout Windows-style, commit Unix-style" (see How to change line-ending settings) which ended up changing the line endings of my bootstrap file that is in my project, which then got copied into the zip file that was uploaded to AWS and even though it looked the same, AWS couldn't run it.

If this is the issue then you can fix it by using the linux command: dos2unix bootstrap on your bootstrap file and then rebuild the native image.

sakis kaliakoudas
  • 2,039
  • 4
  • 31
  • 51