I created Bot on AWS Lex, that internally calls LAmbda functions to fulfill different intents. I tested on the AWS Lex console, and it is working fine for both text and Speech.
I also exported to Alexa Skill Kit (part of developer.amazon.com/alexa) using link - https://aws.amazon.com/blogs/machine-learning/export-your-amazon-lex-bot-schema-to-the-alexa-skills-kit/
Questions -
What would be the correct service endpoint, that I have to pass in Configurations tab (in Alexa Skill Kit). Currently I passed - “https://runtime.lex.us-east-1.amazonaws.com” . But it is not working. Can you help me here ?
You don't need to mix up Lex with Alexa. Lex is the technology behind Alexa. You only need to integrate your Lambda function not Lex url. For that you can provide Lambda ARN under the EndPoint section of the skill builder like below,
I believe you will have to submit lambda Arn which looks like: arn:aws:lambda:us-east-1:{acc_id}:function:{function_name}
Note: Please make sure the right region is picked up
Related
To start I just want to say that I'm really new to AWS overall (1-2 weeks). So I might not think correct from start.
I'm working on an app where I want to click a button in JSX and trigger a Lambda function that gets data from a dynamodb table and shows it in the UI.
I'm writing the infrastructure as code using aws cdk. How should I face this? Do you have any guides that I can follow?
Welcome! Please have a look on this guide.
With AWS, it's a best practice to create an AWS API Gateway, which acts as your HTTP/HTTPS/API web server.
Within this API gateway, you can integrate a Lambda function with a route (e.g. GET /users), where that Lambda function grabs the data from AWS DynamoDB process it as you wish and returns the output.
To integrate it with your code, you create an HTTP GET/POST request to the API gateway URL.
I'm trying to make a ChatBot that uses Dialog Flow and should be able to pickup Keywords and match it to the Intents.
I've worked with Microsoft Bot Framework using Luis and deployed a similar bot on Azure but now I have to do the exact same thing but have to deploy that on AWS and use Elastic Search.
How do I do that? Is there a similar Software available for AWS ?
you can use AWS lex for create chatbot,here is the link for aws lex
https://docs.aws.amazon.com/lex/latest/dg/getting-started.html.
for performing back-end task like validation and dynamic response from bot side,then you need to use lambda again lambda also AWS tool that provide to how to make server-less bot.
https://docs.aws.amazon.com/lex/latest/dg/using-lambda.html
hope this kt will help you.
i am noobie to AWS, i have a question!? where do i deploy this API code? i am not sure on and how to deploy the API code that is been created.
I am trying to download the chat logs for LEX bot.
I am following this documentation https://docs.aws.amazon.com/lex/latest/dg/conversation-logs-configure.html. can someone help me figure out where do i write the API request that is given in the documentation.
You deploy code to whichever server/service you're using, it's all upto you.
Lex is a service that you interact with either through the console, the SDK or via the CLI.
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
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!
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.
I am interested in building bot using AWS Lex but I don't want to use the AWS Lambda for interacting With DB for fetching results,
For Example. If we Ask, "Can you show me the sales for the last month" I want the bot to respond with an Answer " Sales for the last month $1.2 Million"; the Simplest way to achieve this to write an AWS Lambda function to get the details, but can we use an API Endpoint of a web app hosted on Ec2 Instance or AWS ELB
Any thoughts on this?
Surya
Unfortunately no, you cannot use any form of integration for a Lex bot without going through Lambda. You can build Lex bots without Lambda, but they are only able to give static responses and can't call outside of the Lex service.
You can still use your own API endpoint by going via Lambda. Remember that if the resource your calling is in an AWS VPC but not publicly available, you'll need to add extra config for the Lambda to access it. Example of config required for Lambda to call a private AWS endpoint can be see here: AWS: Lambda function cannot call rest api using private API of EC2 instance.
From the Lex FAQs:
Q. How is an action fulfilled?
Amazon Lex integrates with AWS Lambda for ‘fulfillment’ of the action
or business logic. Alternately, you can configure Amazon Lex to return
parsed intent and slot values to the client for action fulfillment.