Kendra
๐ What is Amazon Kendra?¶
Amazon Kendra is a highly accurate, intelligent search service powered by machine learning. It enables organizations to search unstructured and structured data across documents, websites, knowledge bases, and more.
โ Kendra understands natural language questions like โHow do I reset my password?โ and returns the most relevant documents and direct answers.
๐ Use Cases¶
| Industry | Use Case Example |
|---|---|
| IT Support | Internal documentation search, FAQs |
| Healthcare | Search medical manuals, policies, compliance |
| Legal | Discover case laws, compliance docs |
| Education | Course materials, knowledge base search |
| Enterprise | Unified search across SharePoint, Confluence, etc |
๐ง Key Features¶
| Feature | Description |
|---|---|
| Natural language queries | Understands context and intent |
| Direct answers | Extracts specific snippets from documents |
| FAQs support | You can upload CSV/JSON question-answer pairs |
| Document ranking | Uses ML to rank and score documents by relevance |
| Synonyms | You can define synonyms (e.g., "laptop" = "notebook") |
| Access control | Secure document-level filtering with ACLs |
| Multi-language support | English, French, Spanish, German, Japanese, etc. |
| Real-time & batch indexing | Automatically sync documents from data sources |
| Prebuilt connectors | S3, SharePoint, Salesforce, ServiceNow, RDS, Box, etc. |
๐๏ธ Supported Data Sources¶
| Source | Notes |
|---|---|
| Amazon S3 | PDFs, DOCX, HTML, TXT, CSV |
| SharePoint | Online and on-prem |
| Salesforce | Knowledge base, CRM |
| ServiceNow | Incident, change, problem KBs |
| Confluence, Box | Enterprise documentation |
| RDS / Databases | SQL-based connectors |
โ You can also create custom connectors using Lambda.
๐งช Example: Kendra Query API with Python¶
import boto3
kendra = boto3.client('kendra')
response = kendra.query(
IndexId='your-index-id',
QueryText="How do I reset my password?"
)
for result in response['ResultItems']:
print(result['Type'], "โ", result['DocumentTitle']['Text'])
print("Answer:", result['DocumentExcerpt']['Text'])
โ๏ธ Kendra Architecture Overview¶
User Query โ Kendra API
โ
Index (ML-powered search)
โ
Connected data sources (S3, SharePoint, Salesforce, etc.)
โ Kendra supports ACLs, so you can restrict results based on user identity.
๐ฐ Pricing Overview (2024)¶
| Kendra Edition | Developer Edition | Enterprise Edition |
|---|---|---|
| Ideal for | Testing, small workloads | Production, large-scale |
| Documents/month | ~100K | Up to millions |
| Queries/month | 750/month included | Pay-per-query |
| Cost | ~$810/month | Starts at ~$1,620/month |
๐ง Pricing also includes:
-
Connector fees (per source)
-
API queries beyond free tier
๐ Security & Access¶
| Feature | Support |
|---|---|
| IAM Policies | โ Yes |
| KMS Encryption | โ For data at rest |
| Access Control List (ACL) | โ For user-specific results |
| VPC Endpoints | โ Yes (via PrivateLink) |
๐งฑ Terraform Support¶
Terraform support for Amazon Kendra is partial via the aws_kendra_index and aws_kendra_data_source resources.
Create a Kendra Index¶
resource "aws_kendra_index" "example" {
name = "example-kendra-index"
role_arn = aws_iam_role.kendra_role.arn
edition = "DEVELOPER_EDITION"
server_side_encryption_configuration {
kms_key_id = aws_kms_key.example.arn
}
}
Add a Data Source (e.g., S3)¶
resource "aws_kendra_data_source" "s3_source" {
name = "my-s3-source"
index_id = aws_kendra_index.example.id
type = "S3"
role_arn = aws_iam_role.kendra_role.arn
configuration {
s3_configuration {
bucket_name = "my-kendra-documents"
}
}
}
โ TL;DR Summary¶
| Feature | Amazon Kendra |
|---|---|
| Purpose | Enterprise search across unstructured data |
| NLP-powered search | โ Yes |
| Prebuilt connectors | โ 10+ supported |
| Fine-grained access control | โ Document-level filtering |
| Supports FAQ | โ Yes |
| Pricing | Developer & Enterprise Edition |
| Languages supported | 10+ (incl. EN, FR, DE, ES, JP) |
| Terraform support | โ Partial (index, data source) |
| Free trial | โ No Free Tier |