Skip to content

Multi tenancy in Bedrock

0

Can we create multiple Knowledge bases, one for each tenant and then store it in a Single Opensearch serverless with indices and securities such that one tenant should not be able to access data belonging to another tenant in the same opensearch serverless collection.

1 Answer
1

Yes, it is possible to create multiple Knowledge Bases in Amazon Bedrock, one for each tenant, and store them in a single OpenSearch Serverless collection while maintaining tenant isolation. This approach is known as the "Bridge" pattern for multi-tenant Retrieval Augmented Generation (RAG) solutions.

In this setup, you would create separate Knowledge Bases for each tenant, but they would all use the same underlying OpenSearch Serverless collection. To ensure that one tenant cannot access data belonging to another tenant, you can implement the following security measures:

  1. Metadata Filtering: When ingesting documents into the Knowledge Base, tag each document with tenant-specific metadata. For example, you can add a "tenantid" attribute to each document's metadata.

  2. Query Filtering: When retrieving data, use metadata filtering in your queries to ensure that only tenant-specific data is returned. This can be done by including the tenant identifier in your search queries.

  3. Application-Level Security: Implement proper authentication and authorization in your application code to ensure that users can only access their own tenant's data.

  4. Separate OpenSearch Service Indexes: While using a single OpenSearch Serverless collection, you can create separate indexes for each tenant within that collection. This provides an additional layer of isolation.

By combining these techniques, you can achieve tenant isolation within a shared infrastructure, balancing security requirements with cost optimization. This approach allows you to support up to 100 tenants (the maximum number of Knowledge Bases per AWS account) while maintaining data isolation and security.

It's important to note that while this method provides a good balance between isolation and resource sharing, you should carefully consider your specific security requirements and compliance needs when implementing multi-tenancy in your application.

Sources
Multi-tenant RAG with Amazon Bedrock Knowledge Bases | AWS Machine Learning Blog
Multi-tenant vector search with Amazon Aurora PostgreSQL and Amazon Bedrock Knowledge Bases | AWS Database Blog
Multi-tenancy in RAG applications in a single Amazon Bedrock knowledge base with metadata filtering | AWS Machine Learning Blog

answered 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.