Amazon Kendra is a highly accurate and simple-to-use intelligent search service powered by machine learning (ML). Amazon Kendra offers a suite of data source connectors to simplify the process of ingesting and indexing your content, wherever it resides.
Valuable data in organizations is stored in both structured and unstructured repositories. An enterprise search solution should be able to pull together data across several structured and unstructured repositories to index and search on.
One such data repository is ServiceNow. As the foundation for all digital workflows, the ServiceNow Platform® connects people, functions, and systems across your organization. As data accumulates over time, a lot of critical information is stored in service catalogs, knowledge articles, and incidents including attachments for each entry.
We’re excited to announce that we have updated the ServiceNow connector for Amazon Kendra to add even more capabilities. In this version (V2), you can now crawl knowledge articles, service catalog documents, and incidents, and also bring in identity/ACL information to make your searches more granular. The connector also supports ServiceNow versions of Tokyo, Rome, San Diego, and others, and two sync modes: Full Sync mode, which does forced full syncs, and New, Modified, and Deleted mode, which does incremental syncs.
Solution overview
With Amazon Kendra, you can configure multiple data sources to provide a central place to index and search across your document repository. For our solution, we demonstrate how to index a ServiceNow repository using the Amazon Kendra connector for ServiceNow. The solution consists of the following steps:
- Configure an app on ServiceNow and get the connection details.
- Store the details in AWS Secrets Manager.
- Create a ServiceNow data source via the Amazon Kendra console.
- Index the data in the ServiceNow repository.
- Run a sample query to get the information.
Prerequisites
To try out the Amazon Kendra connector for ServiceNow, you need the following:
- A ServiceNow account.
- An AWS account with privileges to create AWS Identity and Access Management (IAM) roles and policies. For more information, see Overview of access management: Permissions and policies.
- Basic knowledge of AWS.
Configure a ServiceNow app and gather connection details
Before we set up the ServiceNow data source, we need a few details about your ServiceNow repository. Let’s gather those in advance.
- Go to https://developer.servicenow.com/.
- Sign in with your credentials.
- Create a ServiceNow instance by choosing Start Building.
- If you’re currently logged in as the App Engine Studio Creator role, choose Change User Role.
- Select Admin and choose Change User Role.
- Choose Manage Instance Password and log in using the instance URL using the admin user and password provided.
- Save the displayed instance name, URL, user name, and password for later use.
- Log in to the instance using the admin URL and credentials from the previous step.
- Choose All and search for Application Registry.
- Choose New to create new OAuth credentials.
- Choose Create an OAuth API endpoint for external clients.
- For Name, enter
myKendraConnector
and leave the other fields blank.ThemyKendraConnector
OAuth is now created. - Copy and store the client ID and client secret to use when configuring the connector in a later step.
The session token is valid for up to 30 minutes. You have to generate a new session token each time you index the content, or you can configure Access Token Lifespan with a longer time.
Store ServiceNow credentials in Secrets Manager
To store your ServiceNow credentials in Secrets Manager, compete the following steps:
- On the Secrets Manager console, choose Store a new secret.
- Choose Other type of secret.
- Create six key-value pairs for
hostUrl
,clientId
,clientSecret
,userName
,password
, andauthType
, and enter the values saved from ServiceNow. - Choose Save.
- For Secret name, enter a name (for example,
AmazonKendra-ServiceNow-secret
). - Enter an optional description.
- Choose Next.
- In the Configure rotation section, keep all settings at their defaults and choose Next.
- On the Review page, choose Store.
Configure the Amazon Kendra connector for ServiceNow
To configure the Amazon Kendra connector, complete the following steps:
- On the Amazon Kendra console, choose Create an Index.
- For Index name, enter a name for the index (for example,
my-ServiceNow-index
). - Enter an optional description.
- For Role name, enter an IAM role name.
- Configure optional encryption settings and tags.
- Choose Next.
- In the Configure user access control section, leave the settings at their defaults and choose Next.
- For Provisioning editions, select Developer edition.
- Choose Create.This creates and propagates the IAM role and then creates the Amazon Kendra index, which can take up to 30 minutes.
- Choose Data sources in the navigation pane.
- Under ServiceNow Index, choose Add connector.
- For Data source name, enter a name (for example,
my-ServiceNow-connector
). - Enter an optional description.
- Choose Next.
- For ServiceNow host, enter
xxxxx.service-now.com
(the instance URL from the ServiceNow setup). - For Type of authentication token, select OAuth 2.0 Authentication.
- For AWS Secrets Manager secret, choose the secret you created earlier.
- For IAM role, choose Create a new role.
- For Role name, enter a name (for example,
AmazonKendra-ServiceNow-role
). - Choose Next.
- For Select entities or content types, choose your content types.
- For Frequency, choose Run on demand.
- Choose Next.
- Set any optional field mappings and choose Next.
- Choose Review and Create and choose Add data source.
- Choose Sync now.
- Wait for the sync to complete.
Test the solution
Now that you have ingested the content from your ServiceNow account into your Amazon Kendra index, you can test some queries.
Go to your index and choose Search indexed content. Enter a sample search query and test out your search results (your query will vary based on the contents of your account).
The ServiceNow connector also optionally crawls local identity information from ServiceNow. For users, it sets the user email ID as principal. For groups, it sets the group ID as principal. If you turn off identity crawling, then you need to upload the user and group mapping to the principal store using the PutPrincipalMapping
API. To filter search results by users or groups, complete the following steps:
- Navigate to the search console.
- Expand Test query with user name or groups and choose Apply user name or groups.
- Enter the user or group names and choose Apply.
- Next, enter the search query and press Enter.
This brings you a filtered set of results based on your criteria.
Congratulations! You have successfully used Amazon Kendra to surface answers and insights based on the content indexed from your ServiceNow account.
Clean up
It is good practice to clean up (delete) any resources you no longer want to use. Cleaning up AWS resources prevents your account from incurring any further charges.
- On the Amazon Kendra console, choose Indexes in the navigation pane.
- Choose the index to delete.
- Choose Delete to delete the selected index.
Conclusion
With the ServiceNow connector for Amazon Kendra, organizations can tap into the repository of information stored in their account securely using intelligent search powered by Amazon Kendra.
In this post, we introduced you to the basics, but there are many additional features that we didn’t cover. For example:
- You can enable user-based access control for your Amazon Kendra index and restrict access to users and groups that you configure
- You can map additional fields to Amazon Kendra index attributes and enable them for faceting, search, and display in the search results
- You can integrate the ServiceNow data source with the Custom Document Enrichment (CDE) capability in Amazon Kendra to perform additional attribute mapping logic and even custom content transformation during ingestion
To learn about these possibilities and more, refer to the Amazon Kendra Developer Guide.
About the authors
Senthil Ramachandran is an Enterprise Solutions Architect at AWS, supporting customers in the US North East. He is primarily focused on Cloud adoption and Digital Transformation in Financial Services Industry. Senthil’s area of interest is AI, especially Deep Learning and Machine Learning. He focuses on application automations with continuous learning and improving human enterprise experience. Senthil enjoys watching Autosport, Soccer and spending time with his family.
Ashish Lagwankar is a Senior Enterprise Solutions Architect at AWS. His core interests include AI/ML, serverless, and container technologies. Ashish is based in the Boston, MA, area and enjoys reading, outdoors, and spending time with his family.