LOCATION

36/7, West Rajiv Nagar
Gurgaon, India
  +91-8431380442
  enquiry@hybridskill.com


91 Springboard
Co-working place 3rd Floor, 175 & 176,
Bannerghatta Main Rd, Dollars Colony
Bengaluru, Karnataka 560076
  +91-8431380442
  enquiry@hybridskill.com

Getting started with Amazon Kendra.



Introduction

This post will take you through creating your custom search on Amazon Kendra with S3 as your data source. What is Amazon Kendra? To get an overview, you can read in the previous post. You need no prior expertise or knowledge in AWS/Machine Learning or search engines. Let’s jump in straight and set up your custom search. 

What will you learn?

Set up a custom search on AWS Kendra, with data source as S3. Understand the process of setting up Kendra and the time/effort it takes to do the same.

What will you need?

  • An AWS account.
  • A bunch of files (pdf, txt, ppt) any will do, to upload to S3.

Let's get started

Sign in to your AWS account, click on the services on the top left corner and search for Amazon Kendra in the search box.

Create an index

On the AWS Kendra page, start by creating an index. Click on create index. There are 2 mandatory fields to create an index. “Index name” and IAM role. 

The index name can be anything. Let’s name it as “demo” for the sake of simplicity. In the IAM role section, click on the drop-down and select create a new role. Enter a role name, and let’s call it demo

Your role name will be prefixed with ‘AmazonKendra-us-east-1-‘. Click on Next at the bottom right on the page. 

Choose the developer edition and click on create.  

Attach a policy to the IAM role.

The IAM role we created in the previous step needs access to data source in this case, we are using S3. So let’s go ahead and add necessary permissions for it.

Click on the services, search for IAM in the search box.
Once you are in the IAM page, click on roles. You should be able to see the “AmazonKendra-us-east-1-demo” role we created in the previous step. Click on the role and click on attach policies.
In the search box serach for S3. Slect the AmazonS3ReadOnlyAccess
and then click on Attach Policy.

Create a bucket in S3 and upload files.

From the services, navigate to S3. Create a bucket and upload files in the bucket.

Add data source

Go to Amazon Kendra page, the status of the index should be active now. 

Click on the Add Data Source. 

From the list we want to choose Amazon S3, click on Add connector.

Name the data source as demo.

In the configure settings page browse the S3 bucket you created in the previous step and select it. 

Choose the IAM role we created “AmazonKendra-us-east-1-demo“.

Under the frequency select Run on demand.

On the review page, Click on create.

Sync the data on S3 with the index

On the data source’s page , click on the Sync Now.

Your search engine is set up.

Conclusion

Amazon Kendra is easy to set up. You can choose between various options for your data sources and support multiple types of data formats. Since Machine Learning powers it, your search results will get better with time.

Article by Mahesh Gunjikar

I am a Solutions Architect at HybridSkill. Passionate about the latest in technology, during my free time I binge-watch Netflix, Prime Video to name a few.


Leave a Reply