首页 > 解决方案 > 使用 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 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 版本。

标签: javascriptamazon-web-servicesaws-amplify

解决方案


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


推荐阅读