skip to Main Content

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


  1. There is no official Java17 runtime for Lambda yet, you would have to create a custom runtime on your own.

    Login or Signup to reply.
  2. 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

    Login or Signup to reply.
  3. 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search