0
votes

Hi I am working building chatbot using Aws Lex and lambda. I am using lexmodelbuildingservice.putIntent API to create new Intent. But when i test my Lambda function. I get below error:

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

I am using below code in my params:

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

Can anybody please tell me how to access and enable lambda arn using nodejs.

Thanks!

1

1 Answers

0
votes

BadRequestException

  • Request validation failed, there is no usable message in the context, or the bot build failed, is still in progress, or contains unbuilt changes.

  • HTTP Status Code: 400

Did your bot completely built? or contains unbuilt changes?