AWS RDS engine mode currently unavailable
Asked Answered
P

3

10

I'm trying to create an RDS Cluster Aurora-MySQL with one instance in it.

I get this error: "InvalidParameterValue: The engine mode provisioned you requested is currently unavailable"

I tried using "serverless" and get the same error.

Region: Ireland (eu-west-1)

Any suggestions?

Portecochere answered 17/6, 2019 at 7:3 Comment(8)
Did you create it via the AWS Management Console or using the API or CLI?Kishakishinev
@Kishakishinev I'm using TerraformPortecochere
Then maybe some parameter is wrong. Can you maybe post the configuration you're using to set it up?Kishakishinev
Yep indeed, please provide the terraform code snippet you are trying to executeWebfoot
source code should be provided if you expect any help from StackoverflowOfilia
I didn't think its a Terraform issue but now it was solved. Guess I didn't put the right attributes at the right place. For some reason the Terraform did not create my Aurora-Mysql and always created an Aurora only. Now I put the engine+engine version in both the cluster and the instance configuration and it worksPortecochere
Nope, not a Terraform issue, but wrong parameters :D You can resolve with your own answer if it's resolved now.Kishakishinev
Source code especially for "Infrastructure as code" is always needed. Not to mention this configuration neglects to specify the provider version.Polypeptide
Y
3

engine and engine_version are mandatory parameters for Create API calls, be it instance or cluster. When you provision via AWS Console, these details are taken care of automatically by the console, but if you're using the SDK or CLI, you'd need to pass in all the parameters explicitly. The MAN pages and/or AWS Docs would come of help in such cases.

P.S. I did expect a different error message though for this case.

Yvette answered 18/6, 2019 at 6:40 Comment(0)
R
14

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
Remindful answered 7/4, 2023 at 15:32 Comment(0)
P
4

When I put engine = aurora-mysql only in the cluster or only in the instance configuration it didn't work. I needed to put it in both.

This is the working code for now

resource "aws_rds_cluster" "rds-cluster" {
    cluster_identifier = "${var.env}-cluster"
    engine = "aurora-mysql"
    engine_version = "5.7.12"
    database_name = "${var.env}rds"
    master_username = "${var.env}"
    master_password = "**********"
    backup_retention_period = 5
    preferred_backup_window = "04:00-22:00"
    skip_final_snapshot = true
}

resource "aws_rds_cluster_instance" "rds-instance" {
    count = 1
    identifier = "${var.env}-db-${count.index}"
    cluster_identifier = "${aws_rds_cluster.rds-cluster.id}"
    instance_class = "db.r4.large"
    engine_version = "5.7.12"
    engine = "aurora-mysql"
}
Portecochere answered 17/6, 2019 at 8:43 Comment(0)
Y
3

engine and engine_version are mandatory parameters for Create API calls, be it instance or cluster. When you provision via AWS Console, these details are taken care of automatically by the console, but if you're using the SDK or CLI, you'd need to pass in all the parameters explicitly. The MAN pages and/or AWS Docs would come of help in such cases.

P.S. I did expect a different error message though for this case.

Yvette answered 18/6, 2019 at 6:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.