I'm building a chatbot using the Node API AWS.LexModelBuildingService, and I want to attach all the new intents to trigger the same lambda function.
In the console I can do it manually, but this doesn't work for the project I'm working on, attaching the lambda must be done dynamically.
When I create the intent I can add the lines to attach the lambda, but then the permissions do not get updated and that's blocking me.
"dialogCodeHook": {
"uri": "arn:aws:lambda:us-east-1:1111111:function:someFunction",
"messageVersion": "1.0"
},
"fulfillmentActivity": {
"type": "CodeHook",
"codeHook": {
"uri": "arn:aws:lambda:us-east-1:1111111:function:someFunction",
"messageVersion": "1.0"
}
}
How can I grant permissions to all current and future intents created with the Node AWS LEX API so they can call the Lambda?