Aws-cdk: Cannot update serverless aurora maxCapacity with CfnDBCluster

Created on 8 Nov 2019  路  12Comments  路  Source: aws/aws-cdk


If you create a serverless Aurora database with CfnDBCluster, and then try to update the maxCapacity, the deployment fails with the message:
"DatabaseCluster You currently can't modify EndpointPort with Aurora Serverless. (Service: AmazonRDS; Status Code: 400; Error Code: InvalidParameterCombination; "
Even though the port was not changed.

Reproduction Steps


Create a serverless database:

  const dbCluster = new rds.CfnDBCluster(this, "DatabaseCluster", {
          engine: "aurora-postgresql",
          engineMode: "serverless",
          engineVersion: "10.7",
          masterUsername: 'postgres',
          databaseName: "collab",
          masterUserPassword: "Foobar",
          dbSubnetGroupName: new rds.CfnDBSubnetGroup(this, "CollabDbSubnetGroup", {
              dbSubnetGroupDescription: ` Collab Db cluster subnet group`,
              subnetIds: vpc.selectSubnets({subnetType: ec2.SubnetType.PRIVATE}).subnetIds
          }).ref,
          vpcSecurityGroupIds: [mySecurityGroupId],
          storageEncrypted: true,
          backupRetentionPeriod: 35,
          deletionProtection: false,
          port: 5432,
          scalingConfiguration: {
              autoPause: true,
              secondsUntilAutoPause: 300,
              minCapacity: 2,
              maxCapacity: 2
          }
      });

Deploy this.

Change nothing other than maxCapacity (to 4).
Running cdk diff shows:

Stack TestCollabDbStack
Resources
[~] AWS::RDS::DBCluster DatabaseCluster DatabaseCluster
 鈹斺攢 [~] ScalingConfiguration
     鈹斺攢 [~] .MaxCapacity:
         鈹溾攢 [-] 2
         鈹斺攢 [+] 4

Which is what you'd expect. However, if you run cdk deploy, the following happens:

TestCollabDbStack: deploying...
TestCollabDbStack: creating CloudFormation changeset...
 0/2 | 11:45:35 PM | UPDATE_IN_PROGRESS   | AWS::RDS::DBCluster     | DatabaseCluster
 1/2 | 11:45:36 PM | UPDATE_FAILED        | AWS::RDS::DBCluster     | DatabaseCluster You currently can't modify EndpointPort with Aurora Serverless. (Service: AmazonRDS; Status Code: 400; Error Code: InvalidParameterCombination; Request ID: 83490936-5bdf-418e-b065-7a79a176beea)

Environment

  • CLI Version :
  • Framework Version: 1.15.0
  • OS : Windows 10
  • Language : Typescript

This is :bug: Bug Report

@aws-cdaws-rds closing-soon

All 12 comments

Thanks for reporting @GregThoen. I confirm I was able to reproduce the issue. However, I'm not sure there's anything to do from the CDK side. That's a problem on the server side. Did you try opening a support issue to the RDS team?

Thanks,
Adam

Thanks for the response, Adam.
No - I guess it's not obvious from my side where the issue is. Would you be able to give me a link to where I could report the issue to the RDS team?

You would have to go through AWS support @GregThoen .

Closing this issue since the problem seems to be directly with the RDS team and not the CDK. Feel free to reopen.

Have you fix this issue? I have the same problem!

Any update?

Same issue on changing ScalingConfiguration

For those of you who commented, if you have access to AWS Support, it'd be great if you file an issue with them. Unfortunately, you can't contact AWS Support for a technical issue unless you have a paid support plan, which my company doesn't (and currently isn't willing to pay hundreds of dollars a month just in order to submit a bug report) -- so I don't think the RDS team even knows they have this bug.

Ran into this issue as well. The solution or at least work-around, if you're not using a custom port, is to just omit the port from the template. It's optional and will use the default port for the engine specified and won't be seen as a change.

Had the same issue. Removing the port reference worked.
I have submitted this as a bug report to AWS via our paid support account.
My suggestion to both the CDK and RDS team would be to make bug reports available to all users when they can't be escalated on the appropriate repo.

Ran into this issue as well. The solution or at least work-around, if you're not using a custom port, is to just omit the port from the template. It's optional and will use the default port for the engine specified and won't be seen as a change.

Update - AWS are aware of the issue internally - Their Response -

That being said, I have checked internally and can currently see that there is a feature request for this and our internal team is aware of it. However, I will not be able to provide an ETA as to when it would be available.

As you must already be aware, any new fix/feature requires rigorous testing and compatibility checks before rolling it out globally in order to make sure that there are no issues caused due to the same. However, please be assured that I have added a +1 on your behalf for this feature request in order to get traction on the same.

I was having this issue as well using the CDK when simply adding a tag to the RDS Cluster. After the CfnDBCluster deployed the first time and their respective values are set I had to omit both, _preferred_maintenance_window and port_, for subsequent releases that modify cdk's CfnDBCluster resource. After making the update, preferred_maintenance_window and port values persisted from the first release, my tag changes took place, and deployment was successful.

Was this page helpful?
0 / 5 - 0 ratings