aws-codebuild-docker-images icon indicating copy to clipboard operation
aws-codebuild-docker-images copied to clipboard

Add GraalVM and Native Image Builder to CodeBuild Image for Java

Open TimGustafson opened this issue 3 years ago • 2 comments
trafficstars

Building Java Lambdas with GraalVM is a recommended best practice to reduce cold start times, but CodeBuild does not currently include the tools (GraalVM, Native Image Builder) that are required for a customer to use CodeBuild to build native images. Having each customer build their own CodeBuild image to include these tools seems wasteful, and including them in the AWS-supported Java CodeBuild image would not negatively impact customers who aren't using it. Including the tools in the Java CodeBuild image would go a long way to helping customers adopt using GraalVM for their Java Lambdas.

For reference, here are some AWS blog posts talking about using GraalVM for this purpose:

https://aws.amazon.com/blogs/developer/graalvm-native-image-support-in-the-aws-sdk-for-java-2-x/

And an example implementation by an AWS employee is available at:

https://github.com/marksailes/al2-graalvm

TimGustafson avatar Jan 17 '22 09:01 TimGustafson

Being able to build native image Lambdas like this would certainly motivate me to start using CodeBuild

timmattison avatar Jan 28 '22 17:01 timmattison

here mark sailes describe all in detail: https://www.graalvmonlambda.com/walkthrough/cdk-docker-build/ but i am interested in a aws solution as well!

wegmeth avatar Apr 08 '22 05:04 wegmeth