【问题标题】:BadRequestException: Lex is unable to access the Lambda functionBadRequestException:Lex 无法访问 Lambda 函数
【发布时间】:2018-06-13 08:02:17
【问题描述】:

您好,我正在使用 Aws Lex 和 lambda 构建聊天机器人。 我正在使用 lexmodelbuildingservice.putIntent API 来创建新的 Intent。但是当我测试我的 Lambda 函数时。我收到以下错误:

BadRequestException: Lex is unable to access the Lambda function arn:aws:lambda:us-east-1:XXXXXXXXXXXX:function:chatBotResponse in the context of intent arn:aws:lex:us-east-1:XXXXXXXXXXXX:intent:BenefitsTwotwo:$LATEST.  Please check the resource-based policy on the function

我在参数中使用以下代码:

fulfillmentActivity: {
        codeHook: {
            uri: "arn:aws:lambda:us-east-1:XXXXXXXXXXXX:function:chatBotResponse",
            messageVersion: "1.0"
         },
     type: "CodeHook"     
    }

谁能告诉我如何使用 nodejs 访问和启用 lambda arn。

谢谢!

【问题讨论】:

    标签: node.js amazon-web-services aws-lambda aws-sdk amazon-lex


    【解决方案1】:

    BadRequestException

    • 请求验证失败,上下文中没有可用消息,或者机器人构建失败,仍在进行中,或包含未构建的更改。

    • HTTP 状态码:400

    您的机器人完全构建了吗?还是包含未构建的更改?

    【讨论】:

      猜你喜欢
      • 2021-10-29
      • 1970-01-01
      • 2020-11-27
      • 1970-01-01
      • 1970-01-01
      • 2021-04-04
      • 2018-06-25
      • 1970-01-01
      相关资源
      最近更新 更多