I’m planning to deploy java 17 function to AWS lambda. But since as per the documentation AWS didn’t provide a bas image for java 17.
https://docs.aws.amazon.com/lambda/latest/dg/lambda-java.html
So I have a problem with what value should I use in cloudformation template Runtime
field
"AMIIDLookup": {
"Type": "AWS::Lambda::Function",
"Properties": {
"Handler": "index.handler",
"Role": {
"Fn::GetAtt": [
"LambdaExecutionRole",
"Arn"
]
},
"Code": {
"S3Bucket": "lambda-functions",
"S3Key": "amilookup.zip"
},
"Runtime": "Java11", # what is the alternative for this
"Timeout": 25,
"TracingConfig": {
"Mode": "Active"
}
}
}
4
Answers
There is no official Java17 runtime for Lambda yet, you would have to create a custom runtime on your own.
Robert is right, either create a custom runtime or use docker image to spin up your aws lambda function https://cloud.netapp.com/blog/aws-cvo-blg-aws-lambda-images-how-to-use-container-images-to-deploy-lambda
There will be an officially managed Java17 runtime from 2023-05-29 on.
See github: https://github.com/aws/aws-lambda-base-images/issues/29#issuecomment-1472890683
A Java 17 Lambda runtime is now available: https://aws.amazon.com/about-aws/whats-new/2023/04/aws-lambda-java-17/