- Newest
- Most votes
- Most comments
Based on the information provided, it appears that you're encountering an issue with the creation of a Bedrock Knowledge Base using an OpenSearch Serverless collection as the vector store. The error suggests that the Bedrock service is unable to find the newly created index in the OpenSearch Serverless collection. This could be due to a few reasons:
-
Propagation Delay: OpenSearch Serverless might take some time to propagate systemic changes or updates across all nodes or replicas of an index. This propagation delay can cause the index to appear unavailable to other services like Bedrock, even if it's visible in the OpenSearch dashboard.
-
Index Health: You mentioned that the index's health status is empty when checked via the CAT API. This could indicate that the index is not fully initialized or healthy, which might prevent Bedrock from accessing it.
-
Permissions: Ensure that the IAM role used for creating the Knowledge Base has the necessary permissions to access the OpenSearch Serverless collection and its index.
To resolve this issue, you can try the following steps:
-
Increase the delay between creating the OpenSearch index and creating the Bedrock Knowledge Base. Instead of a fixed delay, you could implement a polling mechanism that checks the index health status periodically until it becomes active or healthy.
-
Verify that you can manually create and access the index in OpenSearch Serverless. This will help confirm if the issue is related to index creation or permissions.
-
Double-check that the service role you're using for Bedrock has the necessary permissions to access OpenSearch Serverless collections and indexes.
-
Ensure that the vector index is configured with the 'faiss' engine, as required by Bedrock Knowledge Bases.
-
If possible, try creating the Knowledge Base through the AWS console to see if the issue persists. This can help determine if it's an API-specific problem or a general configuration issue.
If the issue persists after trying these steps, you may need to contact AWS support for further assistance, as there could be underlying service-specific issues or limitations that are not immediately apparent.
Sources
Resolve knowledge base permission errors | AWS re:Post
Sync your data with your Amazon Bedrock knowledge base - Amazon Bedrock
Relevant content
- Accepted Answerasked 6 months ago
- asked a year ago
- AWS OFFICIALUpdated a month ago
- How do I troubleshoot permission errors that I get when I create a knowledge base in Amazon Bedrock?AWS OFFICIALUpdated 16 days ago
- AWS OFFICIALUpdated 10 months ago
Our Opensearch Serverless data access policy and Bedrock Knowledgebase IAM role has the necessary permissions. Let me paste down them for your review.
Bedrock Knowledgebase IAM Role policy for Openseach access { "Statement": [ { "Action": [ "aoss:APIAccessAll" ], "Effect": "Allow", "Resource": [ "arn:aws:aoss:us-east-1:account-id:collection/*" ], "Sid": "OpenSearchServerlessAPIAccessAllStatement" } ], "Version": "2012-10-17" }
Look at the allowed permissions in the Opensearch Serverless Data Acces Policy.
Granted resources
Resource type
Permissions
aoss:CreateIndex aoss:DeleteIndex aoss:UpdateIndex aoss:DescribeIndex aoss:ReadDocument aoss:WriteDocument
aoss:CreateCollectionItems aoss:DeleteCollectionItems aoss:UpdateCollectionItems aoss:DescribeCollectionItems
Ok, So we added a delay of 5 minutes as suggested by this AWS GenAI Bot and also refered at below forum post(I am sharing the link) and it worked. Just wait for some time after the vector index creation. I guess, it takes some time to propagate the index and become available to other services.
SEE THE POST HERE