Chatbots have now become a common feature of the e-commerce environment and are spreading into various fields of business and technology. Simply said, if you aren’t investing in chatbots, you are missing out.
Salesforce’s State of the Connected Customer study states:
- 86% of consumers prefer to speak to a chatbot than fill out a form to get answers.
- 77% expect chatbots to turn their expectations of businesses in the next five years.
- Considering developing technologies such as chatbots and voice assistants, 58% of customers think they have higher expectations of businesses.
- 54% of customers expect companies to change the way they connect with them.
It’s simple to lose a client who is irritated because your customer service phone line’s timings or hours don’t correspond with their availability. Or a customer who has been on wait for too long due to an available agent. Chatbots eliminate this possibility.
Many of you are familiar with Alexa, Amazon’s helpful and cheerful assistant who can play music for you, tell you jokes, and humor you with how it’s not going to take over the world. However, not everyone is familiar with Amazon Lex.
Lex is a deep-learning conversational interface that serves as the brains behind the nice female voice on the Amazon Echo & the Echo Dot.
Amazon Lex sticks to the core chatbot architecture that all the major cloud-based Conversational AI providers use. It allows you to create intents, entities, your script (dialogue phrase), and, of course, the dialogue flow.
But how to build a successfully running chatbot with AWS?
This blog will show you how to build your chatbot using AWS Lex.
Technology stack to build a chatbot
To use Amazon Lex, you must currently be an Amazon Web Services user. Consider leveraging additional AWS ecosystem services when working with the framework, such as:
-
Amazon Connect :
Connect is an affordable omnichannel cloud contact center solution that enables dynamic customer-agent interactions. All client communications, including chatbot chats, can be routed here.
-
Amazon Polly :
Amazon Polly lets its users automate text-to-speech synthesizing and create speech-enabled chatbot apps that operate as voice assistants, accept instructions, or answer inquiries.
-
Amazon Chatbot :
AWS Chatbot monitors your Slack and Amazon Chime chat groups for warnings, diagnostics, and support issues, among other things. It’s a simple way to keep everyone on the team informed when you’re integrating the native chatbot and debugging in the early days of the launch.
-
AWS Lambda:
This service provides a platform for running code without the need for server administration. It’s a cost-effective approach to run your chatbot software because you’re just paid per 100ms of code execution or compute time used.
-
Amazon Simple Notification Service:
A flexible chatbot should allow system-to-system communication (as well as app-to-person communication if your chatbot is integrated into an app). Amazon SNS enables you to send messages to millions of people at scale through SMS or mobile push.
Building a chatbot with AWS Lex
It takes less than two hours to build a native chatbot using Amazon Lex and other AWS ecosystem services, even for those with no programming knowledge.
Here’s how to develop a chatbot in Lex in six steps:
-
Create a custom Lex bot
Log in to AWS and go to Lex. Click “Get Started” to configure the service. Then “Create” and choose “Custom Bot.” Fill in the name and output voice for your bot while creating it, or choose “This is only a text-based app.” Set the “Session Timeout” column to one minute and choose “No” for “COPPA.” Then select “Create.”
-
Assign an intent
Click “Create intent” and then on “Create new intent.”
Suppose you want your bot to display recent orders when your clients ask it to. The intent should be called “ListRecentOrders”.
Under “Sample Utterances,” provide variants of sentences that a user could use while attempting to recover their recent orders. They might include:
- List my orders
- List recent orders
- Display/Show the orders
- Show recent orders
To get those recent orders, you must have Amazon Connect configured with a database of client data, including purchase history.
-
Create a Lambda function.
- Navigate to the IAM console and select “Roles,” then click on “Create role,” and finally “Lambda”
- Click “Next: Permissions” and then search for “Lambda basic” in the search field
- Select “AWSLambdaBasicExecutionRole”
- Give it the name “basic-lambda-execution” and then choose “Create role”
- Click “Create function,” “Author from scratch”
- Then type “BotHandler” as the function name in Lambda
- Select the role from IAM and then click “Create function”
-
Build and test the bot
- Return to Lex Console and pick the bot you created in step one
- Choose the intent, then scroll down to “Fulfilment” and choose “AWS Lambda Function”
- Then choose “BotHandler,” the function from step three
- Click “Build” and then test it by launching the chatbot and inputting one of the example utterances from step 2
-
Set up Amazon Cognito
- Amazon Cognito may provide your app authorization to communicate with mobile applications and other external sources. Open Cognitio Console and choose “Manage Federated Identities,” followed by “Create New Identity Pool”
- Before establishing the pool, name it “LexBotPool”
- Select “Enable access to unauthenticated identities”
- Leave all of the settings at their defaults and click “Allow”
- Change the environment to Javascript on the following page and copy the example code for subsequent incorporation of the bot into your native app
- Then, in the IAM interface, choose “Roles,” and add the policies “AmazonPollyReadOnlyAccess” and “AmazonLexRunBotsOnly” to the Cognito roles you created previously
That is the complete process, aside from attaching the bot to an app! You now have a functioning chatbot with a specified function. That is only one of many methods to create a chatbot in Amazon Lex, but the possibilities are limitless due to the framework’s flexibility and the ecosystem’s enormous number of AWS products and services.
AWS cloud computing training can help you with the knowledge and skills you need to efficiently take advantage of AWS services, resulting in increased career chances and job prospects. Individuals can effectively traverse the AWS ecosystem, create scalable solutions, and optimize cloud infrastructure for organizations with hands-on expertise obtained via training.
Get certified in AWS with Cognixia
In addition to the top five resume writing tips mentioned above, having AWS cloud computing training can be an excellent asset for cloud solution architects. An AWS certification demonstrates to potential employers that you have the knowledge and skills to design, deploy, and manage applications on the AWS platform.
According to a survey by Global Knowledge, AWS-certified professionals earn higher than non-certified professionals in the same role. In addition, having an AWS certification can open new job opportunities and increase your chances of landing your dream job.
Therefore, if you are a cloud solution architect looking to advance your career, consider getting an AWS certification and highlighting it on your resume. By doing so, you can differentiate yourself from other candidates and increase your chances of landing your desired job.
Enroll in Cognixia’s cloud computing with AWS training course and upgrade your skill set. You can influence your career and future with our hands-on, live, highly interactive, and instructor-led online course. You may benefit in this competitive market by providing an extremely user-friendly online learning experience. We will assist you in improving your knowledge and adding value to your talents by offering engaging training sessions.
Cognixia’s AWS cloud computing certification course discusses the basics of AWS & cloud computing, then moves on to more advanced concepts, like service models (IaaS, PaaS, SaaS), Amazon Private Virtual Cloud (AWS VPC), and more.
This online AWS cloud computing course will cover the following concepts:
- Introduction to AWS & Cloud Computing
- EC2 Compute Service
- AWS Cost Controlling Strategies
- Amazon Virtual Private Cloud, i.e., VPC
- S3 – Simple Storage Service
- Glacier
- Elastic File System
- Identity Access Management (IAM)
- ELB (Elastic Load Balancer)
- Auto Scaling
- Route53
- Cloud Formation & Cloud Former
- Simple Notification Service (SNS)
- CloudWatch
- Relational Database Service (RDS)
- CloudFront
- Elastic Beanstalk
- CloudTrail
- AWS Application Services for Certifications