- Newest
- Most votes
- Most comments
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:
- Open the Amazon Bedrock console and navigate to the Knowledge bases section.
- Select the Knowledge Base you want to delete.
- For the data source in the DELETE_UNSUCCESSFUL state, choose to edit it.
- In the Advanced settings, change the Data deletion policy to RETAIN.
- Save the changes.
- Attempt to delete the data source again.
- 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:
- Ensure that the IAM service role associated with the Knowledge Base has the necessary permissions to perform deletion operations.
- 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:
- Delete any remaining Knowledge Bases in the Bedrock console.
- Check the Amazon OpenSearch Service console for any lingering Serverless collections and delete them.
- In the IAM console, look for and delete any roles created for the Knowledge Base (they often have names starting with "AmazonBedrockExecutionRoleForKnowledgeBase").
- 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
Relevant content
asked a year ago
asked a year ago
asked 2 years ago
