javascript - 使用 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 版本。
解决方案
所有对节点 6.10 的引用都应在 Amplify CLI 中更新为 8.10。您将在当前配置中查找的大多数引用应该在 cloudformation 文件中,这些文件可以是 json 或 yml。您可以手动更改这些引用并推送,如果您安装了最新版本的 CLI,那么以后应该不会有问题。
推荐阅读
- amazon-web-services - SageMaker:使用预训练模型转换端点输出
- php - CS-Cart mod_fcgid: stderr: PHP Fatal error: Class 'phpmailer' not found in ...app/Tygh/Mailer.php
- css - CSS拒绝在MVC中显示图像
- javascript - 何时以及何时不使用 createAppContainer?
- c# - 实例化时的属性 InvalidDataException
- c - 在终端输出C语言中移动光标
- azure-devops - 当脚本保存在 git 存储库中时,如何将 JMeter 与 Azure DevOps Pipeline 集成?
- python - 仅更新来自另一个文件的 json 文件的叶子
- javascript - `Array.prototype.reduceRight` 是否与 `reverse` 后跟 `reduce` 相同?
- r - 手动将颜色添加到闪亮/ggplot 图