aws-cloudformation / cloudformation-coverage-roadmap

The AWS CloudFormation Public Coverage Roadmap
https://aws.amazon.com/cloudformation/
Creative Commons Attribution Share Alike 4.0 International
1.11k stars 57 forks source link

AWS::RDS::Cluster unable to upgrade major Engine Version with a Custom Parameter Group directly #1373

Open ZalmnS opened 2 years ago

ZalmnS commented 2 years ago

Name of the resource

AWS::RDS::DBCluster

Resource name

AWS::RDS::DBCluster

Description

When attempting a major engine version upgrade via CloudFormation for an AWS::RDS::Cluster that is using a Custom Parameter Group, where the Custom Parameter Group is set to the family of the destination Engine Version, we are met with the following error:

"The current DB instance parameter group is custom. You must explicitly specify a new DB instance parameter group, either default or custom, for the engine version upgrade."

The only way to upgrade your Engine version DB Cluster via CloudFormation that is using a Custom Parameter Group is to perform 3 updates:

  1. First, update the Db Cluster Parameter Group to the Default Parameter Group for your specific Engine and Engine Version within your Stack. (Example, for aurora-postgres version 13: "default.aurora-postgresql13")
  2. Second, update the DB Cluster Version, and Parameter group to the default parameter group for the destination Engine version.(Example, if I were upgrading from aurora-postgres version 13 to 14, I would need to set the Parameter group "default.aurora-postgresql14" within this update)
  3. Third, in the last update, update your DB Cluster Parameter Group to the desired custom DB Cluster Parameter Group.

The idealized way of upgrading the DB Cluster Parameter Group would be:

Upgrade the Engine Version, and DB Cluster Parameter Group to the new Custom Parameter Group that is under the destination engine versions family.

Other Details

No response

tadhglewis commented 1 year ago

Possible workaround https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues/896#issuecomment-1514031406 ?

MindteckPalash commented 2 months ago

We are encountering the following error while setting up the staging environment for Blue/Green deployment during the RDS upgrade from 5.7.mysql_aurora.2.11.5 to Aurora MySQL 3.04.3 (compatible with MySQL 8.0.28). The error message is "The current DB cluster parameter group performancetesting is custom. You must explicitly specify a new DB cluster parameter group, either default or custom, for the engine version upgrade"

Does anyone have any suggestions on how to resolve this issue?

nickpearson commented 1 month ago

I encountered this same problem via the RDS console and was able to work around it. The error message says "You must explicitly specify a new DB cluster parameter group" which lead me to reason that the default cluster parameter group shown in the UI ("default.aurora-mysql8.0") wasn't actually being included in the API request the UI was making behind the scenes, likely because there's only one choice, and it's trying to delegate the "default" selection to the API (at least that's my guess).

To try to force the UI to send the selection shown in the UI (based on the comment in #896 linked above), I created a custom cluster parameter group, just so that another option would exist in the "Choose the DB cluster parameter group for green databases" select box, hopefully forcing the UI to include this field in its API request.

That did the trick. I was able to leave "default.aurora-mysql8.0" selected as the cluster parameter group and create the Blue/Green Deployment without further issue. (I only had to do this workaround for the "DB cluster parameter group" setting. The "DB parameter group" setting did not require any special treatment.)

ConnorCallison commented 1 month ago

We are experiencing the same issue. I tried @nickpearson s workaround above with no luck unfortunately!

image

tryan225 commented 3 weeks ago

+1 Running into this as well