Bedrock Knowledge base - Delete unsuccessful

0

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" } }

3 Answers
1

Hello.

Will it not be deleted even after some time?
In the worst case scenario, you can reduce the cost by deleting only OpenSearch Serverless, so I recommend deleting only this first.
https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-manage.html#serverless-delete

It is possible that the problem is on the AWS side, so I recommend that you open a case with AWS Support under "Account and billing".
Inquiries under "Account and billing" can be made free of charge.
https://docs.aws.amazon.com/awssupport/latest/user/case-management.html

profile picture
EXPERT
answered 3 months ago
0

Hello,

I was in same situation and fixed by doing:

  1. Delete OpenSearch collection

  2. Update data deletion policy: Consider changing the dataDeletionPolicy of the data source to RETAIN instead of DELETE. This can be done by editing the advanced settings of your knowledge base.(Go to amazon Bedrock console > knowledge base, select the knowledge base you want to delete and click on Edit)

  3. Delete data source while the dataDeletionPolicy was in DELETE

  4. After deleting data source , delete knowledge base with dataDeletionPolicy in RETAIN

Enter image description here

answered a month ago
0

Have you managed to delete it yet? I have the same problem.

answered 19 days ago