Building a Virtual Assistant for Local Map Search

By Chirag Oswal , Leo Chan and Jake Smeester | Posted March 12, 2019

Learn Sumerian
Building a Virtual Assistant for Local Map Search


google maps

In this you will learn about:

Integrating Amazon Sumerian and Amazon Lex with Google Maps for location based search.

Intelligent virtual assistants offer an opportunity for hospitality services to improve the customer experience. Venues of all types, hotels for example, can offer guests a more personalized experience through a touch or voice virtual agent, via a self-serve kiosk, or a smartphone. In this post, we build a virtual assistant using Amazon Sumerian that helps you find local restaurants, shops, or malls integrated with Google Maps. If you’re a traveler visiting a new city and you need to identify where local businesses are on a map, this Sumerian virtual assistant will help you find them.

This is the scene we’ll create. To interact with this scene, press and hold the spacebar and say “Show me [local business]” , where [local business] can be restaurants, shops, malls, or theaters. For best results, use the latest version of your web browser. Make sure you have enabled your microphone.

You’ll learn about:

  • Sumerian Hosts
  • Integrating Google Maps
  • Scripting
  • State Machines


Before you begin, you should have completed the following tasks and tutorials:

Watch a recent AWS Twitch stream to learn more.

Step 1: Create an Amazon Cognito Identity Pool ID

Before we get to editing a scene in Sumerian, we need to set up an AWS CloudFormation stack. For more information, see the AWS Setup tutorial to set up your Amazon Cognito identity pool ID.

  1. Sign in to Amazon Sumerian with your AWS account and open this AWS CloudFormation stack template.

  2. Be sure you’re using an AWS Region that supports Amazon Lex. For more information about availability, see the AWS Region Table.

  3. When you have the creation page open, update the Stack name and select the acknowledgement box at the bottom of the page. Then choose Create.

  4. Once the stack loads and reads CREATE_COMPLETE, expand the Output section and copy the CognitoIdentityPoolID value. You will enter this value in Sumerian.

Step 2: Create an Amazon Lex Bot

This scene uses Amazon Lex to parse user requests. We want our Sumerian Host to display local businesses on Google Maps. To achieve this, we’ll connect Amazon Lex and Amazon Sumerian. We’ll set up an intent and various utterances on Amazon Lex and, because of the Amazon Lex natural language understanding capabilities, the Sumerian Host can understand utterances like, show me {localBusinesses}, where is {localBusinesses}, and where are {localBusinesses}. In this exercise, {localBusinesses} can be shops, malls, restaurants, and movie theaters, and so on. First, we create an Amazon Lex bot.

  1. Download the following Amazon Lex bot example .zip file. You don’t need to unzip the file.

  2. Navigate to the Amazon Lex console. Under Actions, choose Import.

  3. Upload the file you just downloaded.

  4. Once the import is complete, Build and Publish your MapConciergeBot Lex bot.

Step 3: Create Your Own Virtual Assistant with Sumerian

Now that we have an Amazon Lex bot, we need to connect it to a Host in our Sumerian scene. Let’s get started creating your virtual assistant scene.

Setting Up the Scene

  1. From the Dashboard, create a new scene.

  2. Select the top-level entity in the Entities panel, and navigate to the Inspector panel. Insert your Cognito Identity Pool ID into the AWS Configuration component.

    By specifying our Cognito Identity Pool ID, we allow our scene to assume the IAM role created by the AWS CloudFormation template in Step 1.

  3. Above the canvas, choose Import Assets in the top center menu. Search for and then add any Host you like. We’ll use Cristine.