Skip to content

Deleting Knowledgebase - previous advice not working

1

I am trying to delete a Knowledge Base as my testing is complete and my charges are racking up every day. Upon trying to change the Data Deletion Policy on a data source as advised, I get the following error: For data sources in a DELETE_UNSUCCESSFUL state, the only field that you can update is dataDeletionPolicy

Is there a way to find all the services running in my account and delete them? The billing support folks point you to getting paid support that is not what I started as a test exercise for Bedrock.

Thanks in advance

1 Answer
1

I understand your frustration with trying to delete a Knowledge Base and manage your AWS costs. Let me provide some guidance on how to address this issue and clean up your resources.

First, regarding the error you're encountering when trying to change the Data Deletion Policy, it appears that your data source is already in a DELETE_UNSUCCESSFUL state. In this case, changing the dataDeletionPolicy to RETAIN is indeed the correct approach, and it should be the only field you can modify at this point.

To resolve the issue and delete your Knowledge Base, try the following steps:

  1. Open the Amazon Bedrock console and navigate to the Knowledge bases section.
  2. Select the Knowledge Base you want to delete.
  3. For the data source in the DELETE_UNSUCCESSFUL state, choose to edit it.
  4. In the Advanced settings, change the Data deletion policy to RETAIN.
  5. Save the changes.
  6. Attempt to delete the data source again.
  7. After successfully deleting the data source, try deleting the Knowledge Base.

If you're still encountering issues after following these steps, there might be underlying problems with permissions or the vector database. In such cases, you may need to:

  1. Ensure that the IAM service role associated with the Knowledge Base has the necessary permissions to perform deletion operations.
  2. Check if the vector database (e.g., Amazon OpenSearch Serverless collection) still exists. If it doesn't, you may need to recreate it temporarily with the same name to complete the deletion process.

As for finding and deleting all related services, unfortunately, there isn't a single command to automatically identify and remove all Bedrock-related resources. However, you can manually check and clean up the following:

  1. Delete any remaining Knowledge Bases in the Bedrock console.
  2. Check the Amazon OpenSearch Service console for any lingering Serverless collections and delete them.
  3. In the IAM console, look for and delete any roles created for the Knowledge Base (they often have names starting with "AmazonBedrockExecutionRoleForKnowledgeBase").
  4. Check your S3 buckets for any datasets you uploaded for the Knowledge Base and delete them if no longer needed.

If you continue to face difficulties or notice unexpected charges, it would be advisable to contact AWS Support. While premium support might not be what you initially signed up for, they may be able to assist with account and billing inquiries even without a paid support plan.

Remember to monitor your AWS Cost Explorer and Billing dashboard regularly to keep track of any ongoing charges and ensure all unnecessary resources are properly terminated.
Sources
Delete a data source from your Amazon Bedrock knowledge base - Amazon Bedrock
Amazon Bedrock Knowledge Bases now supports metadata filtering to improve retrieval accuracy | AWS Machine Learning Blog
Bedrock Knowledge base - Delete unsuccessful | AWS re:Post
Resolve the "Failed to delete knowledge base" error in Bedrock | AWS re:Post

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.