Setup Kendra Index

In this section we will setup an Amazon Kendra index and configure an S3 bucket as a datasource.

  1. Login to the AWS Management Console and confirm that you have set the region to be us-east-1
  2. Search and browse to Amazon Kendra service. Click on Launch Amazon Kendra.
  3. You will see a screen as below. Type “enterprise-search-poc” as the index name, for IAM role, choose Create a new role and provide a name for the role as “poc-role”. Leave the Use an AWS KMS managed encryption key box unchecked. Click create.
  4. For more information on IAM Access Roles for Amazon Kendra visit - https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html
  5. Note that Kendra index creation can take up to 30 minutes
    Kendra Create Screen

Create an S3 bucket to be used as a data source

Let’s create an S3 bucket to be used as a data source while we wait for the Kendra index to be created. Browse to S3 from the Management Console and Create a bucket with default settings. You can use kendra-poc-ds-UNIQUE-SUFFIX as a bucket name, where UNIQUE-SUFFIX will need to be replaced appropriately to make sure the uniqueness of the bucket name.

Check Kendra Index

In the AWS Management Console browse back to Amazon Kendra and click on the name of the index you created earlier. You will see a screen as below. Please note and copy-paste the Index ID to note pad. We will need to use it later.

Kendra Details Screen

Add data source

  1. Click on Add data source. In the Select connector type for your data source screen, click the Add connector button under Amazon S3.
  2. For Data source name give a name e.g. ent-search-poc-ds-001
  3. Configure the data source as shown in the image below. Click on Browse S3 and select the bucket you created earlier. For IAM role select Create a new role. Provide a role name e.g. poc-ds-role. Click on Additional configuration - optional. Add Data/ to include pattern. In Set sync run schedule select Run on demand. Click Next.
    Kendra Data source Config Screen
  4. Check the Review and create screen, confirm the details you configured and press create.
    Kendra Details Screen
  5. Review the details of the data source as below. Please note and copy-paste the IAM role ARN to note pad. We will need to use it later.
    Kendra Data source Full Screen

Create custom attribute

We will create a custom attribute called DocumentType denoting the type of ingested document.

  1. In the AWS Management Console browse to Kendra, click on the index and then click on Facet definition
  2. Click on Add field. Give the Field name to be DocumentType, Data type as String and for Usage types check all the boxes for Facetable, Searchable, Sortable and Displayable as shown below. Click Add.
    Kendra Cust Attr Add Screen
  3. Note the newly defined DocumentType in the list of Index fields
    Kendra Attr Screen

Congratulations! You have successfully configured the Kendra index and data source.