Docs Menu

Troubleshooting the Amazon Bedrock Knowledge Base Integration

This page describes how to troubleshoot common issues that you might encounter when integrating Atlas Vector Search with Amazon Bedrock.

To troubleshoot issues that are not covered on this page, contact MongoDB Support.

Refer to the following steps for general troubleshooting guidance.

If you experience issues when creating the knowledge base, check the following:

  • Use the correct hostname and ensure that it contains a -pl suffix on the cluster if using PrivateLink.

    The hostname is the URL for your Atlas cluster located in its connection string. The hostname uses the following format:

    <clusterName>.mongodb.net
  • Specify the same database, collection, and vector index names as the names you specified in Atlas. Ensure that the database user has access to the database in Atlas.

  • Specify the correct username and password keys in Secrets Manager, and ensure the ARNs are correct. To learn more, see AWS Secrets Manager concepts.

  • If you're using PrivateLink, enter the correct PrivateLink service name when configuring the knowledge base in Amazon Bedrock.

    Important

    The PrivateLink service endpoint must be in the same account as the knowledge base.

  • If you encounter permission-related issues, see How do I troubleshoot permission errors that I get when I create a knowledge base in Amazon Bedrock?.

If you experience issues when syncing or retrieving data from the knowledge base, check the following:

  • Ensure that the data you want to ingest is in a format supported by the foundation model. For example, if you're using a text-based model, ensure that the data is in text format.

  • Ensure that you can connect to your cluster and that its credentials and network access haven't changed.

  • Ensure that you specify the correct number of dimensions in your Atlas Vector Search index corresponding to the foundation model you've chosen.

  • If attempting to filter your data, ensure that you've defined metadata fields as pre-filters in your index definition and that they correspond to the actual fields in your data source.

Note

Each time you add, modify, or remove files from the S3 bucket for a data source, you must sync the data source so that it's re-indexed to the knowledge base. Syncing is incremental, so Amazon Bedrock only processes the objects in your S3 bucket that you've added, modified, or deleted since the last sync. To learn more, refer to the Amazon Bedrock documentation.

Error Message
Troubleshooting Steps

When setting up a knowledge base:

AccessDeniedException: User ... is not authorized to perform: iam:CreateRole on resource ... because no identity-based policy allows the iam:CreateRole action

Ensure that you have the IAM permissions to create IAM roles and policies. To learn more, see the Amazon Bedrock documentation.

When trying to sync a data source for a knowledge base:

ConflictException: You cannot start an ingestion job on a knowledgeBase with status CREATING.

This occurs when you attempt to sync a data source for a knowledge base that is still in the process of being created. Ensure that the knowledge base is in a Ready state before syncing a data source for it.

To learn how to view the status of your knowledge base, see the Amazon Bedrock documentation.

When attempting to add a knowledge base to an agent:

You must save your agent with Agent Resource Role defined before adding a knowledge base.

This occurs if you attempt to add a knowledge base to a new agent that you're creating before you've saved the agent. You must save the agent first, and then add the knowledge base to the agent.

When testing an agent:

Access denied when calling Bedrock. Check your request permissions and retry the request.

This error occurs when you attempt to use a foundation model that you do not have access to. You must request access to Amazon Bedrock models before they're available for use. To learn how to request or modify model access, refer to the Amazon Bedrock documentation.

When using the Amazon Titan Text Embedding model:

BSON field '$vectorSearch.queryVector.####' is the wrong type 'int', expected type 'double'

This is a known issue when using Atlas Vector Search with this model. To resolve this issue, contact MongoDB Support.