0
votes

My colleague created a lex chatbot. I have been working on a lambda function that queries an external database they want to use in their bot. I created an intent to access the function and then exported the intent. I set up the AWS IAM service role for amazon lex and created resource permissions using this (https://docs.aws.amazon.com/lambda/latest/dg/services-lex.html). Though to make it work I did --action lambda:* Still, while the import completes without error, the lambda function does not seem to have been imported into the intent. When the intent is added to a bot, the lambda function is blank and the drop-down menu does not show my lambda function as an option. Is there a way to make the function accessible in my colleague's account in setting up the intent?

1

1 Answers

0
votes

There should be an easier way to do this, but this is the workflow that at least works, even if it is not elegant:

  • create lambda function and export as zip (I use the python-lambda library)
  • other user creates an empty lambda function (same name and python version)
  • other user imports zip in labmda
  • Create an intent in Lex and export (do not put the lambda function in this)
  • other user imports the intent
  • other user modifies the fulfillment section of the intent to include the lambda function they just created.

completely kludgy but does work. Still looking for another way to make it work.