- Newest
- Most votes
- Most comments
This issue is occurring because Aurora Serverless v2 has different Data API behavior compared to v1, specifically regarding supported data types. Unlike Aurora Serverless v1, the v2 Data API doesn't support certain PostgreSQL data types, including geometric and monetary types, as well as tsvector in your case.
You have several options to address this:
- Cast the unsupported data types to TEXT in your queries. Instead of using
SELECT *, you could modify your queries to cast the tsvector columns:
SELECT column1, column2, tsvector_column::TEXT FROM my_table;
or
SELECT CAST(tsvector_column AS TEXT) FROM my_table;
-
Create views that handle the casting for you, then query from those views instead of directly from the tables.
-
Modify your queries to explicitly select only the columns you need, excluding the tsvector columns.
-
As you mentioned, use a Lambda function as a data source instead of the Data API. This would allow you to connect directly to the database without the Data API limitations.
-
If you're experiencing persistent issues, try disabling and then re-enabling the RDS Data API, as this has resolved similar issues for some users.
The most straightforward approach with minimal refactoring would be to cast the tsvector columns to TEXT in your queries or create views that handle this casting for you.
Sources
Comparing Amazon RDS Data API behaviors for Aurora Serverless v2 and provisioned clusters with Aurora Serverless v1 clusters - Amazon Aurora
Limitations for the Amazon RDS Data API - Amazon Aurora
Aurora Serverless v2 - The request was throttled because of insufficient resources on the database | AWS re:Post
Understood, we didn't expect any difference in the Data API behaviour for Aurora Serverless v2, so we are a bit disappointed that https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.differences.html was not mentioned anywhere in the migration guide that we followed: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.upgrade.html#aurora-serverless-v2.upgrade-from-serverless-v1-procedure
Relevant content
asked 4 years ago
- AWS OFFICIALUpdated 7 months ago

After upgrading to Serverless v2, a DATA API issue may occur with AppSync due to changed resource configurations or missing permissions.