I am working on a project that require the usage of amazon lex as a chat bot. I was able to send credential to amazon lex on command line, however, I have trouble when I deploy it to my application. I deploy my bot as a widget using amazon cloudFormation. Here, user can invoker amazon lex intents by typing/speaking utterances. However, in order to fulfill these utterances, the bot (amazon lex) needs to query a database. My problem is I do not know how to send the credential (token) to the amazon lex everytime the user query my bot. Does anyone have an idea on this? Thank you very much.
You can save token as session attribute in Lex. This way you will be able to access this token in your Lambda function.