Javascript 使用AWS放大->&引用;“放大推力”;不起作用

Javascript 使用AWS放大->&引用;“放大推力”;不起作用,javascript,amazon-web-services,aws-amplify,Javascript,Amazon Web Services,Aws Amplify,为了了解如何使用AWS Amplify,我将遵循以下步骤 一切都很顺利,除非达到以下命令: $ amplify push 结局是这样的: Following resources failed Resource Name: PinpointFunction (AWS::Lambda::Function) Event Type: create Reason: The runtime parameter of nodejs6.10 is no longer supported for creat

为了了解如何使用AWS Amplify,我将遵循以下步骤

一切都很顺利,除非达到以下命令:

$ amplify push
结局是这样的:

Following resources failed

Resource Name: PinpointFunction (AWS::Lambda::Function)
Event Type: create
Reason: The runtime parameter of nodejs6.10 is no longer supported 
for creating or updating AWS Lambda functions. We recommend you use 
the new runtime (nodejs8.10) while creating or updating functions. 
(Service: AWSLambdaInternal; Status Code: 400; 
Error Code: InvalidParameterValueException; Request ID: xxxx-8a8e-.....-yyyy-zzzz)

✖ An error occurred when pushing the resources to the cloud

Resource is not in the state stackUpdateComplete

为什么我会犯这个错误?我在过去已经运行过相同的命令。我没有更改我的NodeJS版本。

在Amplify CLI中,对节点6.10的所有引用都应该更新为8.10。您将在当前配置中查找的大多数引用都应该在cloudformation文件中,这些文件是json或yml。您可以手动更改这些引用并推送,如果您安装了最新版本的CLI,这应该不会是一个问题。

错误明确指出-创建或更新AWS Lambda函数不再支持nodejs6.10的运行时参数。事实上,直到最近才支持该参数。无论如何,我也看到了消息的这一部分,并试图修复它,但没有找到按照请求将此nodejs6.10更改为nodejs8.10的方法。我可能看错了信息。事实上,我看过你提到的文档,但它似乎没有给我一个关于如何更改的解决方案(只是对差异的注释)。试着在你的项目中找到文本nodejs6.10,它可能应该在某个地方的.yaml文件中。我现在正在使用find命令执行此操作。