【问题标题】:AWS CloudFormation with node.js 10.x Update Error "ZipFile can only be used when Runtime is set to <older node.js versions>"AWS CloudFormation 与 node.js 10.x 更新错误“ZipFile 只能在运行时设置为 <older node.js 版本> 时使用”
【发布时间】:2019-12-25 15:07:58
【问题描述】:

我们正在使用 CloudFormation 模板在 Lambda 函数上部署一些中间代码。

我们正在使用 ZipFile 函数通过 CloudFormation 添加内联代码。

lambda 函数的当前运行时是 node.js 8.10。 我们需要将节点版本更新到 10.x。

使用 cloudformation 更新 Lambda 时出现以下错误:

ZipFile 只能在 Runtime 设置为任一 nodejs 时使用, nodejs4.3、nodejs6.10、nodejs8.10、python2.7、python3.6、python3.7。

【问题讨论】:

标签: node.js amazon-web-services aws-lambda aws-serverless aws-sdk-nodejs


【解决方案1】:

我相信这是一个已知问题。 https://forums.aws.amazon.com/thread.jspa?threadID=303166&tstart=0 在撰写本文时,这仍然是一个问题。我的建议是在 S3 存储桶中包含超级基本代码并引用它,而不是使用 zip 文件并在创建 lambda 函数后部署您的实际代码。或者,您可以将 zip 工件上传到 S3 存储桶。如果您的代码是专有的,请注意 S3。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-02-21
    • 1970-01-01
    • 2017-04-26
    • 2018-07-02
    • 1970-01-01
    • 2014-06-14
    相关资源
    最近更新 更多