Lambda support for Java 17 LTS

3

I am in the process of upgrading the java version from Java 8 to latest Java LTS version (Java 17) and the architecture from x86_64 to ARM64 for some of my lambda functions. I am interested to know the timeline of the Amazon Corretto 17 support in Lambda.

질문됨 2년 전10735회 조회
4개 답변
1

The Java 17 runtime for AWS Lambda was released yesterday, April 27th - official release notes here: https://aws.amazon.com/blogs/compute/java-17-runtime-now-available-on-aws-lambda/

Also, a Java migration guide was released on Serverlessland which wasn't in the question but it's useful for anyone that's migrating an existing Java app to Lambda - https://serverlessland.com/content/service/lambda/paved-path/java-replatforming/access-patterns

AWS
답변함 일 년 전
0

No official timeline. ( there is an Issue opened on the AWS repo ) But as you probably already know you can create your own container image in the Amazon ECR container registry and run your lambda function.

Hope it helps. Alex

aaagius
답변함 2년 전
0

Hello AWS-User-samaram,

Has your problem about Lambda support been resolved? Let us know. Also, remember to click on the "Accept" button when an answer provided in the community helped you. This allows other community members to also benefit from it. Thank you for your participation.

profile picture
지원 엔지니어
답변함 2년 전
0

I had the same need you did, so I created unofficial community AWS Lambda base images for Java 17, 18, and now 19 using the official amazoncorretto/amazoncorretto image. They're available in the ECR Public Gallery and DockerHub, and are totally free to use.

Using the community base image is exactly like using the officially-supported base images. For example, the following is the Dockerfile from an example Java 17 lambda function:

FROM public.ecr.aws/aleph0io/lambda/java:17.0.4-al2

COPY target/hello-lambda.jar "${LAMBDA_TASK_ROOT}/lib/"

CMD [ "com.sigpwned.lambda.hello.HelloLambda::handleRequest" ]

Of course, these are not "official" AWS images, and as soon as official AWS images are released you should use those instead. In the meantime, these are a good option. I'm using them in production for my own projects, and they work a treat.

The source code for the base images is on GitHub at aleph0io/aws-lambda-java-base-images, and there is a writeup of the base image on my blog as well, for the curious.

profile picture
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠