我计划将Java 17函数部署到AWS lambda。但是根据文档,AWS没有为Java 17提供基础映像。
https://docs.aws.amazon.com/lambda/latest/dg/lambda-java.html
因此,我对cloudformation模板Runtime
字段中应该使用什么值有问题
"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条答案
按热度按时间ubby3x7f1#
Lambda有no official Java17 runtime,你必须自己创建一个custom runtime。
jxct1oxe2#
Robert是对的,要么创建一个自定义运行时,要么使用docker镜像来启动AWS lambda函数https://cloud.netapp.com/blog/aws-cvo-blg-aws-lambda-images-how-to-use-container-images-to-deploy-lambda。
chhqkbe13#
Java 17 Lambda运行时现已可用:https://aws.amazon.com/about-aws/whats-new/2023/04/aws-lambda-java-17/
watbbzwu4#
从2023-05-29开始,将有一个官方管理的Java 17运行时。参见github:https://github.com/aws/aws-lambda-base-images/issues/29#issuecomment-1472890683
编辑:Java 17已经可用:https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html