This error is also encountered when incorrectly trying to configure a serverless v2 configuration.
It's a bit unintuitive, but engine_mode = "serverless"
works for v1 and engine_mode = "provisioned"
is required for v2.
To ensure that you have a serverless v2 cluster you need:
engine_mode = "provisioned"
instance_class = "db.serverless"
engine_version = "15.2"
Note, the engine version will change over time. You can see which ones are available by using this CLI command:
aws rds describe-orderable-db-instance-options --engine aurora-postgresql --db-instance-class db.serverless \
--region us-east-1 --query 'OrderableDBInstanceOptions[].[EngineVersion]' --output text