Automation on AWS with Chatbot Serverless
Chatbots have gained a lot of strength recently, they are a conversation system that can interact with our clients or can automate manual tasks through the use of A.I. However, for its implementation at the corporate level, it is important to ask yourself some questions to identify if I really need a chatbot:
What type of chatbot will I need?
This is where we should examine a little what types there are:
- Informative: They attend to recurring requests from customers, for example, information on an account statement, product status, the weather, the news...
- Applications: They can be integrated into mobile applications to improve the user experience and facilitate interaction with it.
- Enterprise: They are usually integrated with corporate platforms such as ERP or CRM.
- Contact Center: They are used to interact with the user with voice, they can be for example for problem-solving, to review a shipping guide or even make payments with a credit card.
What types of communication channels do I have with my customers?
Here it is important to know where are the communication channels that I currently have with my client, for example:
- Toll-Free hotlines — 01800
- DID service lines.
- Through social networks.
- WhatsApp.
- SMS.
Depending on the type of communication channel with the customer, we must validate the viability of its implementation and select the best technology for it.
Now I’m going to tell you about the process of implementing a chatbot that we did a while ago to automate some tasks and save time
Scenario
I was with my friend Felipe Mejia in a very large project for an application that had a strong data component and realtime, within this project many AWS services were used such as Fargate, Kinesis, Glue, Athena, Quicksight among many others. When the project started to grow exponentially the challenges increased and the complexity too, that’s where our focus was on finding ways to automate our work.
- Project: Data and Analytics.
- Processing: 80,000,000 events per day in real-time.
- Monthly Cost: USD 25,000
- We spent 20% of the time trying new services and running PoC, in many cases several services were active generating additional costs (Glue’s Dev Endpoints).
Solution
We created a ChatBot with Amazon LEX called Perkins to control AWS services:
- Create and remove AWS services.
- Daily notification about turned on services.
- Automation of administrative tasks.
- Communication in natural language with the Bot.
Chatbot Architecture
Below I describe the functionality of the components:
- Validation Lambda: The inputs received from slack are verified, once the flow is validated it continues to phase 2.
- Fulfilment Lambda: Take the actions with the actions that come from the validation lambda. In this case, it is in charge of executing the actions on the AWS services.
- DynamoDB: Store all the information regarding the services to interact and the inputs to validate for Validation Lambda.
Chatbot Architecture with Amazon Connect
- Amazon Connect: Contact center in AWS, we could create complex flow contact and redirect to an agent queue in order to get attended.
- Amazon Polly: Is the service that turns text into speech with different voices and languages.
Security in Chatbot Serverless
Within the implemented architecture, security was handled in the following way:
- Lambda Role: It has the specific permissions to interact with the AWS services that we are going to automate.
- Slack: We had a private channel that is only accessible by authorized personnel who can use Perkins for automation tasks.
- Encryption: We had the Dynamo table fully encrypted with KMS, as well as the environment variables used in lambda functions.
Perkins and Slack Interaction
This is the way to interact directly with Perkins our chatbot serverless.