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

Struggling with making this work on Apple Silicon (M1 Max) #1

Open
stejsj opened this issue Mar 24, 2022 · 2 comments
Open

Struggling with making this work on Apple Silicon (M1 Max) #1

stejsj opened this issue Mar 24, 2022 · 2 comments
Assignees

Comments

@stejsj
Copy link

stejsj commented Mar 24, 2022

Hi Mark

Thank you very much for your detailed information about graalvm on lambda and the code with cdk using docker to build a native image. When I run cdk deploy for graalvm-on-lambda/walkthrough/serverless-graalvm-arm64/infrastructure

I get this error in the lambda console when trying to call product route... the function build with graalvm.

START RequestId: ad65dc9b-f6d0-49d5-bd93-6ff92dd7b86e Version: $LATEST
Failed to load the native runtime interface client library /aws-lambda-runtime-interface-client.glibc.so. Exception: Can't load library: /tmp/.aws-lambda-runtime-interface-client
Failed to load the native runtime interface client library /aws-lambda-runtime-interface-client.musl.so. Exception: Can't load library: /tmp/.aws-lambda-runtime-interface-client
Failed to load the native runtime interface client library /aws-lambda-runtime-interface-client.glibc.so. Exception: Can't load library: /tmp/.aws-lambda-runtime-interface-client
Failed to load the native runtime interface client library /aws-lambda-runtime-interface-client.musl.so. Exception: Can't load library: /tmp/.aws-lambda-runtime-interface-client
END RequestId: ad65dc9b-f6d0-49d5-bd93-6ff92dd7b86e
REPORT RequestId: ad65dc9b-f6d0-49d5-bd93-6ff92dd7b86e Duration: 1144.37 ms Billed Duration: 1145 ms Memory Size: 256 MB Max Memory Used: 43 MB
RequestId: ad65dc9b-f6d0-49d5-bd93-6ff92dd7b86e Error: Runtime exited with error: exit status 255
Runtime.ExitError

I think I have tried almost everything possible, can you perhaps spot the issue?

Kind regards and thanx in advance!
Steffen Egelund Jensen

@dannylinden
Copy link

Im facing the same issue. I build the binary in an ARM Docker Container on a Intel MacBook.

@stejsj could you find a solution in the meantime?

@marksailes
Copy link
Owner

Sorry for the slow response. The latest version of the aws-lambda-java-runtime-interface-client supports ARM.

<dependency>
    <groupId>com.amazonaws</groupId>
    <artifactId>aws-lambda-java-runtime-interface-client</artifactId>
    <version>2.1.1</version>
</dependency>

You will also need to update the resource-config.json to account for the path change.

https://github.com/aws-samples/serverless-graalvm-demo/blob/main/software/products/src/main/resources/META-INF/native-image/com.amazonaws/aws-lambda-java-runtime-interface-client/resource-config.json

https://github.com/aws-samples/serverless-graalvm-demo - has a complete working sample of these changes.

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

No branches or pull requests

3 participants