Hello, I need help deleting a knowledge base.
Here is the setup. I have a knowledge base with a Data source pointing to Amazon S3 and the Vector database in Amazon OpenSearch Serverless. My mistake during deletion was to first delete the vector database, and now the knowledge base won't delete.
I have tried to change the Data deletion policy from Delete to Retain, however, I get this error "Error undefined The policy is attached to 0 entities but it must be attached to a single role".
I have also tried to recreate the vector database in Amazon OpenSearch Serverless with the same name, however, the issue persists.
I also gave the knowledge base role "AmazonBedrockExecutionRoleForKnowledgeBase_mwi7s" full access in IAM via the AdministratorAccess policy, but still no luck.
$ aws bedrock-agent delete-knowledge-base --knowledge-base-id ZEZMU36L77
{
"knowledgeBaseId": "ZEZMU36L77",
"status": "DELETING"
}
$ aws bedrock-agent get-knowledge-base --knowledge-base-id ZEZMU36L77
{
"knowledgeBase": {
"createdAt": "2024-05-23T13:26:14.221173+00:00",
"failureReasons": [
"Unable to delete data from vector store for data source with ID LNZRBILGCR. Check your vector store configurations and permissions and retry your request. If the issue persists, consider updating the dataDeletionPolicy of the data source to RETAIN and retry your request."
],
"knowledgeBaseArn": "arn:aws:bedrock:us-west-2:xxxxxxxxxxxx:knowledge-base/ZEZMU36L77",
"knowledgeBaseConfiguration": {
"type": "VECTOR",
"vectorKnowledgeBaseConfiguration": {
"embeddingModelArn": "arn:aws:bedrock:us-west-2::foundation-model/amazon.titan-embed-text-v1"
}
},
"knowledgeBaseId": "ZEZMU36L77",
"name": "knowledge-base-quick-start-mwi7s",
"roleArn": "arn:aws:iam::xxxxxxxxxxxx:role/service-role/AmazonBedrockExecutionRoleForKnowledgeBase_mwi7s",
"status": "DELETE_UNSUCCESSFUL",
"storageConfiguration": {
"opensearchServerlessConfiguration": {
"collectionArn": "arn:aws:aoss:us-west-2:xxxxxxxxxxxx:collection/nwqjke9vs8jsi3n1t2zi",
"fieldMapping": {
"metadataField": "AMAZON_BEDROCK_METADATA",
"textField": "AMAZON_BEDROCK_TEXT_CHUNK",
"vectorField": "bedrock-knowledge-base-default-vector"
},
"vectorIndexName": "bedrock-knowledge-base-default-index"
},
"type": "OPENSEARCH_SERVERLESS"
},
"updatedAt": "2024-05-23T20:59:55.814904+00:00"
}
}