12

Community-Managed AWS Lambda Base Images for Java 18

 1 year ago
source link: https://sigpwned.com/2022/08/31/aws-lambda-base-images-for-java-18/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Community-Managed AWS Lambda Base Images for Java 18

I’ve added a new custom base image for Java 18 on Lambda to complement the community Java 17 base images already available. You can find the images on the ECR Public Gallery and DockerHub and the source code on GitHub. If you’ve been waiting to adopt Java 18 until there was Lambda support, then these base images will let you get started.

Screen-Shot-2022-08-31-at-9.54.33-AM-1024x367.png

Where Can I Find the Base Images?

The images are publicly available on the ECR Public Gallery and DockerHub. I will also make them available on the other major Docker registries, but I’ll make sure that at least the current images stay available on that repository going forward.

How Do I Use Them?

Using these custom base images is just like using stock AWS base images. You can find an example on GitHub at aleph0io/example-java-lambda-function. For convenience, find the Dockerfile below. Note the FROM clause:

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

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

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

How Mature Are They?

The Java 18 images are all tested live on Lambda on deployment, but I have not built any production services with them. Also, they are not (well) optimized for size, cold start time, or performance, so please consider them experimental, at least for now. All feedback and PRs welcome!

Can I see the Source Code?

Of course! The source code is released under the Apache 2.0 license. If you’re curious, you can find the source code for the base image on GitHub at aleph0io/aws-lambda-java-base-images.

CategoriesAWS, Java, Java 18, Lambda

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Comment *

Name *

Email *

Website

Post navigation


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK