Breadcrumbs

AWS Hints and Tips Lexbot Rapport

AWS Hints and Tips

Creating an AWS account

https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/

Create the Root User

Step 1: Set Up an AWS Account and Create an Administrator User

https://docs.aws.amazon.com/lexv2/latest/dg/gs-account.html

Creating your first IAM admin user and user group

https://docs.aws.amazon.com/IAM/latest/UserGuide/getting-started_create-admin-group.html

What is Amazon Lex V2?

https://docs.aws.amazon.com/lexv2/latest/dg/what-is.html

Building Bots

https://docs.aws.amazon.com/lexv2/latest/dg/building-bots.html

You tube quick guide https://www.youtube.com/watch?v=Gy0C9g16DW0


Step by Step Screen Shots

Step by Step Creating a Lex Bot
Create a bot
1. From the AWS console home screen enter Lex in the search function if you have not already created a bot.
2. If you have created a bot then click on Amazon Lex


att_20_for_210894849.png

3. To create a new bot, click Create bot

att_21_for_210894849.png


4. Choose whether you are creating a bot from blank or from an example


att_22_for_210894849.png



5. As an example choose an Example. In this case Make an Appointment

att_11_for_210894849.png

6. Give the Bot a name.

att_1_for_210894849.png

7. Set the IAM permissions

att_4_for_210894849.png

8. Coppa is set in this example to No. You may want to set it to yes.

att_16_for_210894849.png


9. No tags are set in this example, click Next.

10. Choose the language you want to use

att_12_for_210894849.png


11. Click Done

att_23_for_210894849.png


Further information on Intents, sample utterances, slots can be found online or in the AWS information.

12. The intention here is just to show the basics of creating a bot, therefore we will just accept the information provided and click Build.

att_24_for_210894849.png

13. Next, you can test the bot. Click Test

att_31_for_210894849.png

14. Test complete


15. Click on the AWS symbol in the top left hand corner and go back to the console.


16. The new bot is shown in the list of Bots.

att_25_for_210894849.png

17. Click on your latest bot. In this case Makeanappointment2
We need to provide an alias.

att_30_for_210894849.png

18. Click on Aliases

att_17_for_210894849.png


19. Create a version of the bot that can be used. The draft version should not be used.
Click on Bot Versions
And then Create Version


att_5_for_210894849.png



Version 1 has been created. We now assign the previously created alias to the version>.

Click on the Version

att_13_for_210894849.png


And associate alias with Version

att_26_for_210894849.png


att_6_for_210894849.png

20. The bot has been created, we now need to associate this with Rapport.


How to give access to your Lex bot for Rapport

In order for Rapport to visualize your Lex bot creation, you’d have to grant read access for us. By giving this type of access, we won’t be able to modify anything, just direct conversations to your bot’s way and get its responses back for visualization. To give access, please follow these steps:

  1. Log in to your AWS console and navigate to IAM.

  2. Select Roles on the left under Access management and press the Create Role button. Complete the form as follows:

att_32_for_210894849.png



att_27_for_210894849.png



21 Click on Services

att_7_for_210894849.png


Select IAM on the Right hand panel

att_18_for_210894849.png


Then choose Roles

att_2_for_210894849.png


22 Create a role


att_3_for_210894849.png


Enter 621658667134 into the Account ID field.


att_14_for_210894849.png



Then click Next

Enter Lex in the search field and

  1. Search for AmazonLexReadOnly and select the policy.

  2. Search for AmazonLexRunBotsOnly and select the policy.


att_28_for_210894849.png

3. Search for AmazonPollyReadOnlyAccess and select the policy.

Enter Polly


att_15_for_210894849.png


4. Click Next


Enter the name and description of the role

att_8_for_210894849.png


At the bottom of the screen click CREATE Role

att_9_for_210894849.png



att_19_for_210894849.png



Click on the role your created, in this case MakeanAppoint2



23 Here you will find the details that are required for linking with Rapport.


att_29_for_210894849.png


It’s the ARN number in the middle.


  1. Click on the role name and it will load the new role.

  2. Look for the Role ARN and use that on our Rapport AI Registration site.
    ( It should look something like this:
    arn:aws:iam::123456789012:role/rapport-lex-mylexrole1 )

In this case arn:aws:iam::802779006630:role/MakeanAppoint2


24 Then enter your details in Rapport. As an example


The Name should be the name of your Bot

The alias should be the alias associated with your Bot

The IAM role should be the information from the ARN field in amazon.

Then submit.

image-20240630-103154.png