I just started to create a simple chat bot using Amazon Lex. I would like to use some session
attributes. Basically, my bot needs to call many lambda functions passing a user-id
(that will change, not sure yet how to set it). I'd like to set the user-id
as a session attribute, so it will be passed as parameter to every function. However, I can't find a way to do it directly through the web console (interface). Is it possible or can it be done only via the CLI
?
Asked
Active
Viewed 1,710 times
2

Titus Pullo
- 3,751
- 15
- 45
- 65
-
If i understand correctly, you have a LEX bot deployed on your webpage and u want to pass your webpage level attributes to lambda function via ur lex bot when user submits to an intent? – Rhythem Aggarwal Jun 18 '18 at 11:26
-
Have you tried: https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html – Rhythem Aggarwal Jun 18 '18 at 11:27
-
Yes I did check it, but they assume the `session-attributes` are already set. I don't know how to create them – Titus Pullo Jun 18 '18 at 12:25
-
Possible duplicate of [How do I integrate AWS Lex chatbot to my website?](https://stackoverflow.com/questions/43059930/how-do-i-integrate-aws-lex-chatbot-to-my-website) – EpicVoyage Jun 18 '18 at 16:45
-
No, I am looking to how to set session attributes via the web interface...totally different than that question – Titus Pullo Jun 19 '18 at 09:04
1 Answers
0
I don't think its possible to set the user-id from lex dashboard. Lex is creating random user-id and passing it to lambda function. I have created Lex bot and integrated with website and called the lex from website using aws postText function where i have given my own user-id and session attritubes. You can refer in aws postText reference

Edwin Babu
- 709
- 8
- 15
-
I am interested as to how you did this. I get what you mean but i had a hard time implementing it. Hoping for some clarity and help. :D – Jay Hyber Aug 13 '21 at 00:39