In my previous blog (https://nivleshc.wordpress.com/2019/10/09/managing-amazon-ec2-instances-using-amazon-ses/), I showed how we can manage Amazon EC2 instances using emails. However, what if you wanted to go further than that? What if, instead of sending an email, you instead wanted to dial in and check the status of or start/stop your Amazon EC2 instances?
In this blog, I will show how I used the above as a foundation to create my own Contact Center. I enriched the experience by including an additional option for the caller, to be transferred to a human agent. All this in minutes! Still skeptical? Follow on and I will show you how I did all of this using Amazon Connect.
High Level Solution Design
Below is the high-level solution design for the Contact Center I built.
The steps (as denoted by the numbers in the diagram above) are explained below
- The caller dials the Direct Inward Dial (DID) number associated with the Amazon Connect instance
- Amazon Connect answers the call
- Amazon Connect invokes the AWS Lambda function to authenticate the caller.
- The AWS Lambda function authenticates the caller by checking their callerID against the entries stored in the authorisedCallers DynamoDB table. If there is a match, the first name and last name stored against the callerID is returned to Amazon Connect. Otherwise, an “unauthorised user” message is returned to Amazon Connect.
- If the caller is unauthorised, Amazon Connect informs them of this and hangs up the call.
If the caller is authorised, Amazon Connect uses the first name and last name provided by AWS Lambda function to personalise a welcome message for them. Amazon Connect then provides the caller with two options:
- (6a) press 1 to get the status of the Amazon EC2 instances. If this is pressed, Amazon Connect invokes an AWS Lambda function to get the status of the Amazon EC2 instances and plays the results to the caller
- (6b) press 2 to talk to an agent. If this is pressed, Amazon Connect places the call in a queue, where it will be answered by the next available agent
My solution requires the following components
- Amazon DynamoDB table to store authorised callers (an item in this table will have the format phonenumber, firstname, lastname)
- AWS Lambda function to authenticate callers
- AWS Lambda function to get the status of all Amazon EC2 instances in the region
I created the following AWS CloudFormation template to provision the above resources.
The above AWS CloudFormation template can be downloaded from https://gist.github.com/nivleshc/926259dbbab22dd4890e0708cf488983
Currently AWS CloudFormation does not support Amazon Connect. The implementation must be done manually.
Leveraging on my own experience with setting up Amazon Connect solutions, I observed that there are approximately three stages that are required to get a Contact Center up and running. These are:
- Provisioning an Amazon Connect instance – this is straight forward and essentially is where an Amazon Connect instance is provisioned and made ready for your use
- Configuring the Amazon Connect instance – this contains all the tasks to customise the Amazon Connect instance. It includes the configuration of the Direct Inward Dial (DID), hours or operations for the Contact Center, Routing profiles, users etc
- Creating a custom Contact flow – a Contact flow defines the customer experience of your Contact Center, from start to finish. Amazon Connect provides a few default Contact flows however it is highly recommended that you create one that aligns with your own business requirements.
Follow along and I will show you how to go about setting up each of the above mentioned stages.
Provision the Amazon Connect Instance
- From the AWS Console, open the Amazon Connect service. Select the Sydney region (or a region of your choice, however do keep in mind that at the moment, Amazon Connect is only available in a few regions)
- Enter an Access URL for your Amazon Connect Instance. This URL will be used to access the Amazon Connect instance once it has been provisioned.
- In the next screen, create an administrator account for this Amazon Connect instance
The next prompt is for Telephony options. For my solution, I selected the following:
- Incoming calls: I want to handle incoming calls with Amazon Connect
- Outgoing calls: I want to make outbound calls with Amazon Connect
- Incoming calls: I want to handle incoming calls with Amazon Connect
- In the next screen, Data Storage options are displayed. For my solution, I left everything as default.
- In the next screen, review the configuration and then click Create instance
Configure the Amazon Connect Instance
After the Amazon Connect instance has been successfully provisioned, use the following steps to configure it:
- Claim a phone number for your Amazon Connect Instance. This is the number that users will be calling to interact with your Amazon Connect instance (for claiming non toll free local numbers, you must open a support case with AWS, to prove that you have a local business in the country where you are trying to claim the phone number. Claiming a local toll-free number is easier however it is more expensive)
- Create some Hour of operation profiles. These will be used when creating a queue
- Create a queue. Each queue can have different hours of operation assigned
- Create a routing profile. A user is associated with a routing profile, which defines their inbound and outbound queues.
- Create users. Once created, assign the users to a predefined security profile (administrator, agent etc) and also assign them to a specific routing profile
Create a custom Contact flow
A Contact flow defines the customer experience of your Contact Center, from start to finish. By default, Amazon Connect provides a few Contact flows that you can use. However, it is highly recommended that you create one that suits your own business requirements.
To create a new Contact flow, follow these steps:
- Login to your Amazon Connect instance using the Access URL and administrator account (you can also access your Amazon Connect instance using the AWS Console and then click on Login as administrator)
- Once logged in, from the left-hand side menu, go to Routing and then click on Contact flows
- In the next screen, click on Create contact flow
Use the visual editor to create your Contact flow
Once the Contact flow has been created, attach it to your Direct Inward Dial (DID) phone number by using the following steps:
- from the left-hand side menu, click on Routing and then Phone numbers.
Click on the respective phone number and change its Contact flow / IVR to the Contact flow you want to attach to this phone number.
Below is a screenshot of the Contact flow I created for my solution. It shows the flow logic I used and you can easily replicate it for your own environment. The red rectangles show where the AWS Lambda functions (mentioned in the pre-requisites above) are used.
This is pretty much all that is required to get your Contact Center up and running. It took me approximately thirty minutes from start to finish (this does not include the time required to provision the Amazon DynamoDB tables and AWS Lambda functions). However, I would recommend spending time on your Contact flows as this is brains of the operation. This must be done in conjunction with someone who understands the business really well and knows the outcomes that must be achieved by the Contact Center solution. There is a lot that can be done here and the more time you invest in your Contact flow, the better outcomes you will get.
The above is just a small part of what Amazon Connect is capable of. For its full set of capabilities, refer to https://aws.amazon.com/connect/
So, if you have been dreaming of building your own Contact Center, however were worried about the cost or effort required? Wait no more! You can now easily create one in minutes using Amazon Connect and pay for only what you use and tear it down if you don’t need it anymore. However, before you start, I would strongly recommend that you get yourself familiar with the Amazon Connect pricing model. For example – you get charged a daily rate for any claimed phone numbers that are attached to your Amazon Connect Instance (this is similar to a phone line rental charge). Full pricing is available at https://aws.amazon.com/connect/pricing/).
I hope the above has given you some insights into Amazon Connect. Till the next time, Enjoy!