ValidationException: The OpenSearch Serverless engine type associated with your vector index is invalid
Shows how to fix validationException: The OpenSearch Serverless engine type associated with your vector index is invalid. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
What actually fixes it (verified in the thread): Recreate the OpenSearch Serverless vector index with "engine": "faiss" instead of "nmslib" in the storage configuration, then retry the CreateKnowledgeBase call. The amazon-bedrock-samples repo was fixed the same way.
Steps
- A user creating an Amazon Bedrock Knowledge Base backed by an OpenSearch Serverless vector index got a ValidationException on CreateKnowledgeBase. The full error: The OpenSearch Serverless engine type associated with your vector index is invalid. Recreate your vector index with one of the following valid engine types: FAISS. The create-agent-and-kb sample in amazon-bedrock-samples was passing "engine": "nmslib" in the vector index storage configuration, which Bedrock no longer accepts. Another user confirmed hitting the same error with nmslib.
- What actually fixes it (verified in the thread):
- Recreate the OpenSearch Serverless vector index with "engine": "faiss" instead of "nmslib" in the storage configuration, then retry the CreateKnowledgeBase call. FAISS is the only accepted engine type now. The amazon-bedrock-samples repo was fixed the same way. Source: https://github.com/aws-samples/amazon-bedrock-samples/issues/130
When to use
You are seeing this: The situation: A user creating an Amazon Bedrock Knowledge Base backed by an OpenSearch Serverless vector index got a ValidationException on CreateKnowledgeBase. Use this skill when you run into "ValidationException: The OpenSearch Serverless engine type associated with your vector index is invalid".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Sources
- https://github.com/aws-samples/amazon-bedrock-samples/issues/130