0

I have set up the amazon lex bot in AWS and I am able to test this successfully in the Test bot section. I started exploring accessing the amazon lex bot from the external web ui (my local application) and I found the tool called amazon aws lex web UI (https://github.com/aws-samples/aws-lex-web-ui) and It seems very complex to setup, I have few queries here

1) Is this (https://github.com/aws-samples/aws-lex-web-ui) the only way to use amazon lex bot from my local web application?
2) This section has the notes for running locally (https://github.com/aws-samples/aws-lex-web-ui#running-locally) How to generate the amazon Cognito pool Id for the amazon lex bot?

Thanks,
Harry

Harry
  • 3,072
  • 6
  • 43
  • 100

2 Answers2

2

1) No

Amazon Lex is ultimately a service, which means it can be called from any application that calls the API appropriately. The sample provided by AWS is just an example of how to call that API. So, this is not the only way to use Amazon Lex bots from your local web application.

You can create a fully custom Bot UI from scratch (like I did) that calls the Amazon Lex API to service your application. (More on this can be found at this question that another user has asked - note that the response for this question is done in C#)

2)

There is an example provided by AWS at the following link which has a section on how to set up Cognito for this purpose (again, this is what I used to set up my own Bot)

Hope this helps you!

Community
  • 1
  • 1
  • One quick question, Is it possible to upload the file / documents via Amazon Lex ? – Harry Oct 03 '19 at 09:34
  • I'm not sure what you're asking exactly. Do you want Lex to be able to do something with the file (i.e. manipulation, extract data from file etc.) ? Or are you just asking if Lex can identify it as a file and upload it to some database/website? – Arun Balasubramaniam Oct 04 '19 at 06:33
  • We have a custom chat UI which connects to amazon lex bot for processing, so bot needs to ask for uploading the documents to S3 from the customer via our custom UI – Harry Oct 04 '19 at 07:06
  • One more query, How do you use amazon lex bot in your application? – Harry Oct 04 '19 at 07:07
0

https://github.com/aws-samples/aws-lex-web-ui is an utility tool, which you may use, but in most cases you will end up implementing your own display logic. It most cases it is connecting it to sms, facebook, whatsapp... You have an API https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostText.html in which you can interact with Lex, I suggest using that.

Horatiu Jeflea
  • 7,256
  • 6
  • 38
  • 67