【问题标题】:AWS Lambda task time out when adding newman添加 newman 时 AWS Lambda 任务超时
【发布时间】:2018-04-26 09:20:58
【问题描述】:

我正在尝试使用 Lambda 执行 Newman,但在 index.js 中添加 newman 时总是超时:

const newman = require('newman');

exports.handler = function(event, context, callback) {
   console.log("aa = "); 
   callback(null, "some success message");
}

如果我删除第一行 - const newman = require('newman'); 执行成功。

我的文件夹结构似乎也正确:
index.zip
- index.js
- 节点模块

即使我在 Lambda 中添加超时,它最终也会超时。知道出了什么问题吗?提前致谢!

【问题讨论】:

  • 您的 lambda 在 VPC 内吗?
  • 不,我在我的 Lambda 配置中的 Network 下拉菜单中选择 no VPC

标签: node.js lambda aws-lambda newman postman-collection-runner


【解决方案1】:

根据个人经验,我相信您可能没有为 lambda 函数分配足够的内存。我在 aws lambda 环境中遇到了与 newman 类似的问题。尝试提高内存使用量,看看是否有帮助。

【讨论】:

    猜你喜欢
    • 2017-09-20
    • 2019-11-06
    • 2021-10-17
    • 2019-06-02
    • 2018-05-15
    • 2018-08-08
    • 2020-11-06
    • 2019-01-28
    • 1970-01-01
    相关资源
    最近更新 更多