How to specify nodeJS runtime through AWS CLI lambda update command?

0

In the lambda create command you can specify nodeJS runtime environment parameter for lambda, but in the update command you will get an error if you specify runtime parameter. As a result, you have to manually update nodeJS runtime in the UI. What would be the best solution if I prefer to not manually update in UI?

1 回答
0

Hi,

You could use the update-function-configuration command to update the runtime, by specifying the identifier of the function’s runtime from a list of possible values, on the runtime parameter.

However, as explained on the following Knowledge Center article, you can't change directly the configuration or function code in a published Lambda function version; you must first change the current unpublished function version ($LATEST) using the update-function-configuration command and then publish a new function version using the publish-version command.

I hope this helps you.

profile picture
专家
已回答 1 年前
profile pictureAWS
专家
已审核 1 年前
profile picture
专家
已审核 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则