Select your cookie preferences

We use cookies and similar tools to enhance your experience, provide our services, deliver relevant advertising, and make improvements. Approved third parties also use these tools to help us deliver advertising and provide certain site features.

Integrate Amazon Kendra with Amazon Bedrock

Created with SnapAmazon S3Amazon KendraCreate indexInvoke BedrockGenerate response

AWS Lambda function to retrieve documents from an Amazon Kendra index and pass it to Amazon Bedrock for a generated response.

AWS Lambda: Two AWS Lambda functions are created. DataSourceSync crawls and indexes the content. InvokeBedrockLambda invokes the specified model by passing the retrieved content from Amazon Kendra as context to the generative AI model.
Amazon Kendra: An Amazon Kendra index is created with an Amazon S3 data source and InvokeBedrockLambda retrieves the index documents.
Amazon Bedrock: Documents retrieved from the Amazon Kendra index are sent to Amazon Bedrock which responds with a generated response.

< Back to all patterns


GitHub icon Visit the GitHub repo for this pattern.

Download

git clone https://github.com/aws-samples/serverless-patterns/ cd serverless-patterns/lambda-kendra-bedrock

Deploy

sam deploy --guided --capabilities CAPABILITY_NAMED_IAM


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: sam delete.

Kruthi Jayasimha Rao

Presented by Kruthi Jayasimha Rao

Kruthi is a Partner Solutions Architect with a focus in Generative AI. She provides technical guidance to AWS Partners in following best practices to build secure, resilient, and highly available solutions in the AWS Cloud.

Follow on LinkedIn