No results found
April 02, 2018Akersh Srivastava
In a recent webinar on Alexa for Business, we discussed how a voice-enabled interface can create new opportunities in a workplace, from building private Alexa skills to smart enabling conference rooms. Enabling Alexa as an organizational capability has the potential to truly revolutionize employee engagement within an organization. As a business manager, imagine asking Alexa within a private skill built specifically for your organization for key insights into your business, such as “who is our largest customer in Northern California?” or “how has our sales volume grown between quarter one and quarter two in our Asian markets?” This post will outline how you can build a private Alexa skill to address these scenarios.
Modern business intelligence (BI) systems transform data into a wealth of analytics that can help drive strategic and tactical organizational decisions. From marketing and sales data to key performance indicators that reveal the health of a business, BI tools enable managers and analysts to access and analyze data to derive actionable insights.
Recently, I had the chance to meet with two Solutions Architects from our AWS team, Chad Neal and Adam Westrich, who have been sharing knowledge on exactly this topic and leading workshops around the country on voice enabling business analytics.
Chad and Adam presented an architecture around a low-latency cloud-based BI platform, automating the retrieval of data through queries against a data lake. The platform architecture they propose uncovers dynamic insights from Twitter data leveraging Amazon Simple Storage Service (S3), AWS Athena, Amazon QuickSight, Amazon DynamoDB, and Amazon CloudWatch in the backend, and a voice-based user interface through a custom Alexa skill on the front-end.
In this post, I’ll provide a high-level overview of how this architecture fits together, and then I’ll point you to a self-paced tutorial so you can build it out yourself.
Without further ado, this is what the overall architecture looks like:
There are four high-level components of end-to-end BI systems: data collection, data storage, data analysis, and data presentation. Let’s talk about how this architecture fulfills the requirement of each of these components.
For the purpose of this post (and to stay consistent with Chad and Neal’s workshop), we’ll make the assumption that the data is already available. For those of you that are curious about the ingestion and collection process, one way to do this would be to create a delivery stream of Twitter data with Amazon Kinesis Firehose. Firehose is well-suited for this task as it’s built for high throughput and large-scale data ingestion; therefore, it satisfies the criterion for reliability, scalability, and cost effectiveness. It’s also simple to configure to write to S3. You can read more about persisting streaming data to S3 here.
The infrastructure requirement for sustaining an assortment of different data types is met with the creation of a data lake in S3. Data lakes facilitate the storage of vast amounts of non-uniform and unstructured data in their native format. S3 is a popular choice these days, as it’s highly scalable and entirely un-opinionated on the type of data it can store. This is increasingly useful in a world where data is often collated from multiple sources. S3 integrates relatively easily with Amazon Athena, which brings us to the topic of data analysis.
Traditionally, unformatted and raw data requires significant post-processing before it’s ready to be analyzed. Amazon Athena makes this task much easier. Athena is a powerful service that makes it possible to analyze data in S3 using standard SQL. Athena is simply pointed to an S3 bucket, a data schema is defined, and that’s it! The data in S3 is indexed and ready to be queried directly with Athena. Athena is also serverless, so there is no infrastructure to manage, which represents an additional operational advantage. And that’s all it really takes; we are now up and running with a data lake (S3) and a SQL-based query engine (Athena).
Data discovery can be an important process in finding the desired insights and metrics. An essential tool in this process is one that aggregates data quickly for pattern identification and allows the user to visualize the results in various charts and graphs. To provide low-level information in the form of highly detailed tables, charts, and graphs, Amazon QuickSight can be quickly integrated with Athena. QuickSight possesses a super-fast, parallel, in-memory computation engine (SPICE) for fast interactive analyses and building powerful smart visualizations from underlying data sets quickly and efficiently.
In this way, Athena acts as a “connective tissue” between the computational and presentation layer provided by Amazon QuickSight and the raw unstructured data in S3.
As efficient as Athena is, complex SQL queries into unstructured data can take several seconds. To ensure the integrity of a positive voice experience for users, lower latency and quick responses are considerably important.
For data delivered to the voice interface, DynamoDB is used. First, metrics are manually identified to expose through the Alexa skill. In practice, these would be metrics that either change frequently or are accessed frequently. Then, an AWS Lambda function containing an SQL query for the previously identified metrics is created. The Lambda function is automated via CloudWatch events to run on a regular schedule and inserts the latest values into a DynamoDB table. You can learn how to schedule CloudWatch events here.
The custom Alexa skill is built on top of this. It allows users to retrieve the information quickly and naturally through responsive voice-based interactions. The Alexa skill itself is exceedingly simple to create. It contains a single intent, in which a user provides an utterance with a single slot value for the metric they wish Alexa to retrieve. The intent handler in Lambda resolves the intent, retrieves the slot value, and reads the respective data point in the DynamoDB table.
This type of architecture also generates a massive cost advantage. Not only is a voice user interface more efficient than clicking through a graphical user interface (GUI) or typing complex queries into an engine; Athena, Lambda, and S3 are cloud enabled and pay-by-use, reducing maintenance cost during low utilization periods, minimizing the overall footprint of a business’s IT infrastructure, and cutting management overhead.
With something like this in place, if you’re ever having a conversation with a colleague you no longer need to switch context and look at a screen, or navigate through a menu when you need reference data. You can instead continue your dialog and naturally communicate with Alexa to retrieve the information you need.
Chad and Adam have put together a self-paced tutorial based on their architecture that walks you through a full build-out in your AWS environment. The jump-start techniques you’ll learn in this tutorial can be directly associated to any organization’s data analytics repository. This will enable you to create a faster way to deliver insights to your company’s stakeholders.
Additionally, Alexa skills can now be made privately accessible to organizations through Alexa for Business enabled skills.
The tutorial is structured into building out three modules, which encompass the architectural parts of building a business intelligence platform:
Access the self-paced tutorial on GitHub and build your own Alexa skill for voice-enabled analytics.
Chad Neal (@chadneal) is a Solutions Architect Manager based in Denver, Colorado. With over 20 years of experience in the rapid design, development, and integration of large-scale projects. He has worked on a wide variety of projects, ranging from aerospace and defense to media and entertainment. Chad was an early adopter of AWS having started in 2008. Since then he has helped move 100s of workloads to the cloud.
Adam Westrich (@WestrichAdam) is a Solutions Architect based in Southern California. His passion is working with customers on their AWS Cloud journey leveraging AWS managed services, including serverless, allowing them to focus their resources on innovation and their core business.