Does Bedrock knowledge base support structured data source which is Redshift Serverless that has an external schema pointed to an Aurora Postgres db?

0

I have a Redshift workgroup with an external schema pointed at an Aurora Postgres db schema. I am able to get data via the redshift sql editor via federated queries. When I point the knowledge base, using structured data source, at the database, the data sync fails with "either database is empty or the user does not have permissions". If I create a normal schema within the same database and create a table with data in it and rerun the data sync, it succeeds but when I test the knowledge base, none of the data from the external schema is available. So I am trying to determine if it supports federated queries and how exactly it determines if a database is empty or not.

asked 8 days ago37 views
1 Answer
0

Based on the information available, it appears that Amazon Bedrock Knowledge Bases may not fully support federated queries to external schemas like the one you've described with Redshift Serverless pointing to an Aurora PostgreSQL database.

The behavior you're experiencing suggests that Bedrock Knowledge Bases is likely only considering the local schemas within the Redshift cluster when performing its data sync and query operations. This would explain why the sync fails when only the external schema is present (as it sees the database as "empty"), but succeeds when you create a local schema with data.

Bedrock Knowledge Bases is designed to work with structured data sources, including Amazon Redshift, but it seems to have limitations when it comes to federated queries. The service primarily focuses on querying data that is directly stored within the connected data source.

To determine if a database is empty, Bedrock Knowledge Bases likely checks for the presence of tables and data within the schemas it can directly access. In your case, it's not recognizing the tables in the external schema.

Unfortunately, there doesn't appear to be a straightforward way to make Bedrock Knowledge Bases work with your federated query setup. You might need to consider alternatives such as:

  1. Materializing the data from your Aurora PostgreSQL database into local tables within your Redshift cluster.
  2. Using a different approach to integrate your Aurora PostgreSQL data with Bedrock Knowledge Bases, possibly through ETL processes or by connecting directly to the Aurora database if supported.

For the most accurate and up-to-date information on supported configurations and potential workarounds, it would be best to contact AWS Support or consult with an AWS solutions architect. They may be able to provide more specific guidance or information on any planned support for federated queries in Bedrock Knowledge Bases.
Sources
Turning data into a knowledge base - Amazon Bedrock
AWS Bedrock knowledge base for Structured Data with Glue Tables | AWS re:Post
Build a knowledge base by connecting to a structured data store - Amazon Bedrock
Create a knowledge base by connecting to a structured data store - Amazon Bedrock

profile picture
answered 8 days 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.

Guidelines for Answering Questions