Similar to Error creating DB Instance: InvalidParameterCombination: Cannot find version 5.6.10a for aurora-mysql but for Postgres, which has a different cause.
* error creating RDS Cluster (mycompany-pulumi-aurora-cluster) Instance: InvalidParameterCombination: Cannot find version 12.6 for aurora
status code: 400, request id: someid
But 12.6 is valid for Aurora PostgreSQL in that region:
$ aws rds describe-db-engine-versions --engine aurora-postgresql --query '*[].[EngineVersion]' --output text --region us-east-2
9.6.3
9.6.6
9.6.8
9.6.9
9.6.11
9.6.12
9.6.16
9.6.17
9.6.18
9.6.19
9.6.21
10.4
10.5
10.6
10.7
10.11
10.12
10.13
10.14
10.14
10.16
11.4
11.6
11.7
11.8
11.9
11.11
12.4
12.6
There's two simultaneous causes of this error:
Aurora versions are restricted based on the instance type
You need to specify the engineVersion
for each cluster instance (as well as the cluster itself).
Resulting code (I'm using Pulumi, but the same logic applies for Terraform, raw CloudFormation etc).
const rdsCluster = new aws.rds.Cluster("default", {
clusterIdentifier: config.database.clusterName,
engine: "aurora-postgresql",
// Restricted based on https://docs.amazonaws.cn/en_us/AmazonRDS/latest/AuroraUserGuide/Concepts.DBInstanceClass.html#Concepts.DBInstanceClass.SupportAurora
engineVersion: "12.7",
databaseName: config.database.name,
masterUsername: config.database.username,
masterPassword: config.database.password,
dbSubnetGroupName: rdsSubnetGroup.name,
storageEncrypted: true,
});
// https://www.pulumi.com/docs/reference/pkg/aws/rds/clusterinstance/#engineversion_nodejs
const clusterInstances: Array<aws.rds.ClusterInstance> = [];
for (let range = 0; range < config.database.instanceCount; range++) {
clusterInstances.push(
new aws.rds.ClusterInstance(`clusterInstances-${range}`, {
identifier: `aurora-cluster-demo-${range}`,
clusterIdentifier: rdsCluster.id,
instanceClass: config.database.instanceType,
// Engine must be specified otherwise AWS will give a misleading error about DB versions not being available.
// https://github.com/hashicorp/terraform-provider-aws/issues/2419#issuecomment-347060274
engine: "aurora-postgresql",
engineVersion: "12.7",
})
);
}