0

I am uploading a java 8 function on lambda but the libs are taking a huge place.

Each lib is duplicated for specific os:

  • *-linux-x86.jar
  • *-linux-x86_64.jar
  • *-linux-armhf.jar
  • *-linux-arm64.jar

I could take only one to get a lighter package but I can not found which one I have to take for aws lambda with java 8

4
  • 1
    The docs should help then. Commented May 15, 2020 at 15:15
  • I already had a look, but I can only see Amazon Linux, and I can not find more details Commented May 15, 2020 at 15:23
  • 2
    If you look closely, you might notice 100% of those Amazon Linux versions end in "x86_64". And 0% of them end in "x86" or "arm*". You can make custom images. And I would expect a "x86" custom image would work. But I have no idea if they even support arm for custom images. Commented May 15, 2020 at 15:35
  • @Ajouve do you still need help? Commented Apr 1, 2022 at 7:51

1 Answer 1

1

The Java Lambda runtime supports following architectures:

Name Identifier Architecture
Java 11 java11 x86_64, arm64
Java 8 java8.a12 x86_64, arm64
Java 8 java8 x86_64

So you would only have to package either x86_64 or the arm64 libs.

Lambda functions that use arm64 architecture (AWS Graviton2 processor) can achieve significantly better price and performance than the equivalent function running on x86_64 architecture. Consider using arm64 for compute-intensive applications such as high-performance computing, video encoding, and simulation workloads. Source

Depending on which architecture you want to use, you only have to package the libs for that architecture. You can deploy your Lambda function either as zip file and configure the architecture used in the Lambda function's settings or create a Lambda function from a container image

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.