Introduction
Amazon Kendra GenAI index enhances semantic search by combining traditional search relevance with Large Language Model (LLM)-powered scoring to deliver accurate, contextual results. This feature extends beyond keyword matching to understand the semantic meaning of queries and documents, enabling natural and precise information retrieval. This article demonstrates how to create an Amazon Kendra GenAI index using SharePoint Online as a data source.
Data source
SharePoint Online serves as a secure document management and collaboration platform accessible from any device. For this demonstration, the SharePoint document library contains Wikipedia documents that will be indexed using Amazon Kendra GenAI.
Pre-requisites
- An AWS account with permissions to,
- Create and manage the Amazon Kendra index
- Configure AWS Secrets Manager
- Set up IAM roles and permissions
- Create and manage an Amazon S3 bucket
- Install PnP PowerShell.
- Register a Microsoft Entra ID application to use with PnP PowerShell
- Install git.
- Application Developer permission role or the Global Administrator permission role to register a Microsoft Entra ID app.
Register an app in Microsoft Entra ID
Register a Microsoft Entra ID application using the following steps.
- Launch PowerShell 7.
- Run the following command to register an Entra ID application.
$result = Register-PnPAzureADApp -ApplicationName "AmazonKendraGenAIIndexApp" ` -Tenant vigneshganesan.com ` -OutPath "C:\Users\XXXXXXXX\Documents\Vijai\Blogs\code\PowerShell" ` -CertificatePassword (ConvertTo-SecureString -String "password" -AsPlainText -Force) ` -GraphApplicationPermissions "User.Read.All" ` -SharePointApplicationPermissions "Sites.FullControl.All" ` -Interactive $result - Note down the Client ID, .cer, and .pfx file path from the $result parameter.

- Upload the certificate (.cer file) generated in the previous step to Amazon S3 Bucket.

- Now, you extract the private key contents from the .pfx file. This .pfx file will be present in the certificate file path copied in the previous step.
- Launch Git Bash.
- Run the following command to extract the private key. Note: Navigate to the folder path where certificates are available.
openssl pkcs12 -in "AmazonKendraGenAIIndexApp.pfx" -nocerts -out "AmazonKendraGenAIIndexApp.key" - You will be prompted for the import password. Enter the password that you used while registering the app. You will be prompted again to provide a new password to protect the .key file that you are creating. Store the password to your key file in a secure place to avoid misuse.
- Run the following command to decrypt the private key. This decrypted key will be stored in AWS Secrets Manager for the Amazon Kendra data source configuration.
openssl rsa -in "AmazonKendraGenAIIndexApp.key" -out "AmazonKendraGenAIIndexApp-decrypted.key"
















Join the conversation! Your thoughts help the community grow.