Skip to content

[Terraform] InvalidParameterValue: The engine mode serverless is unavailable for Aurora PostgreSQL 16.6 (us-east-1)

0

I am attempting to create an Aurora PostgreSQL Serverless v2 cluster in us-east-1 using Terraform with engine_version = "16.6". The terraform apply command consistently fails with the following API error:

InvalidParameterValue: The engine mode serverless you requested is currently unavailable.

The specific parameters for the API call are:

Engine: aurora-postgresql

Engine Version: 16.6

Engine Mode: serverless

I have already performed the following troubleshooting steps:

  1. Confirmed engine_version = "16.6" and the serverless engine mode are supported for Aurora PostgreSQL in us-east-1 by checking the AWS Console UI.

  2. Successfully created the exact same cluster configuration manually through the AWS Console, which confirms the configuration is valid for my account and the issue is not a syntax error.

  3. Retried the Terraform deployment multiple times.

It appears there may be an underlying issue with the CreateDBCluster API endpoint for this specific configuration.

If it helps the RequestID for a recent failed API call is: 4968b857-aa13-4399-9d35-2c7ebeff14be.

Is this a known issue, or are there any temporary workarounds or steps I can take to successfully provision this cluster via Terraform?

1 Answer
0
Accepted Answer

Hello.

For Aurora Serverless V2, you do not specify serverless in "engine_mode".
Specify serverless in the "instance_class" of the instances in the cluster.
The following documents provide examples:
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/rds_cluster

To create a Serverless v2 RDS cluster, you must additionally specify the engine_mode and serverlessv2_scaling_configuration attributes. An aws_rds_cluster_instance resource must also be added to the cluster with the instance_class attribute specified.

resource "aws_rds_cluster" "example" {
  cluster_identifier = "example"
  engine             = "aurora-postgresql"
  engine_mode        = "provisioned"
  engine_version     = "16.6"
  database_name      = "test"
  master_username    = "test"
  master_password    = "must_be_eight_characters"
  storage_encrypted  = true

  serverlessv2_scaling_configuration {
    max_capacity             = 1.0
    min_capacity             = 0.0
    seconds_until_auto_pause = 3600
  }
}

resource "aws_rds_cluster_instance" "example" {
  cluster_identifier = aws_rds_cluster.example.id
  instance_class     = "db.serverless"
  engine             = aws_rds_cluster.example.engine
  engine_version     = aws_rds_cluster.example.engine_version
}
EXPERT
answered 2 months 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.