You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project provides AWS Lambda function base images for Java 17. The base images are publicly available available [in the ECR Public Gallery](https://gallery.ecr.aws/m6n4d7c2/sigpwned/aws-lambda-java-base-image). You should be able to use them directly in your builds. I expect to use these base images for production lambda functions reasonably soon, but in the meantime please consider them to be *very experimental*.
3
+
This project provides the missing [AWS Lambda base image](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-images.html) for Java 17. The base images are publicly available [in the ECR Public Gallery](https://gallery.ecr.aws/m6n4d7c2/sigpwned/aws-lambda-java-base-image). You should be able to use them directly in your builds. I expect to use these base images for production lambda functions reasonably soon, but in the meantime please consider them to be *very experimental*.
4
4
5
5
## Approach
6
6
@@ -10,14 +10,26 @@ This project uses the following process to create new Lambda base images:
10
10
2. Also teach maven to collect these dependencies and build the appropriate docker images using the Dockerfile using the excellent [fabric8io/docker-maven-plugin](https://github.com/fabric8io/docker-maven-plugin).
11
11
3. Use GitHub Actions to do perform CI/CD and release new images to the ECR Public Gallery.
12
12
13
+
## Example Lambda Function
14
+
15
+
You can find an example Lambda function using these base images at [sigpwned/example-java-17-lambda-function](https://github.com/sigpwned/example-java-17-lambda-function). It's just like building any container lambda function. For ease of use, find the `Dockerfile` below. Note the `FROM` image.
16
+
17
+
FROM public.ecr.aws/m6n4d7c2/sigpwned/aws-lambda-java-base-image:17.0.3-al2
* This image is in no way optimized for cold start time, size, etc. PRs welcome!
15
26
* For now, only Java 17 is supported. I hope to provide base images for additional versions soon.
16
27
* For now, only x86_64 is supported. I hope to publish multiarch builds including arm64 soon.
17
28
* I suspect I will also clean up the ECR public gallery presence, but this gets the images out for now.
29
+
* Of course, as soon as there *is* an offically-supported AWS Lambda base image for Java 17, everyone should use that instead! But this project should hopefully fill the gap in the meantime, and will (hopefully) support non-LTS Java versions that will never receive an officially-supported AWS Lambda base image by that time.
18
30
19
31
## Acknowledgements
20
32
21
-
Many thanks to @rieckpil for [his outstanding writeup of custom Lambda runtimes](https://rieckpil.de/java-aws-lambda-container-image-support-complete-guide/). That tutorial was the foundation and basis for this build. Cheers!
33
+
Many thanks to [@rieckpil](https://github.com/rieckpil) for [his outstanding writeup of custom Lambda runtimes](https://rieckpil.de/java-aws-lambda-container-image-support-complete-guide/). That tutorial was the foundation and basis for this build. Cheers!
22
34
23
-
Also, thank you to @msailes for [the example Java 17 Lambda layer](https://github.com/msailes/lambda-java17-layer). This prior art was also critically important to understanding how best to integrate a new Java version into Lambda.
35
+
Also, thank you to [@msailes](https://github.com/msailes) for [the example Java 17 Lambda layer](https://github.com/msailes/lambda-java17-layer). This prior art was also critically important to understanding how best to integrate a new Java version into Lambda.
0 commit comments