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!