question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot update serverless aurora maxCapacity with CfnDBCluster

See original GitHub issue

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
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 Report

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:18 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
vendamerecommented, Apr 30, 2020

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.

2reactions
chris-batemancommented, Jul 13, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AWS::RDS::DBCluster - AWS CloudFormation
Currently, when you are updating the stack for an Aurora Serverless DB cluster, you can't include changes to any other properties when you...
Read more >
Upgrading from AWS Aurora Serverless v1 to v2 fails
The steps described are basically to take a snapshot, create a new Provisioned Aurora cluster (not Serverless) and then upgrade the Provisioned ...
Read more >
AWS Data API for Amazon Aurora Serverless - mad About cloud
Due to unpredictable number of AppServers we can't control the final maximum number of connections to the database anymore. With introduction of ...
Read more >
Into to Aurora Serverless
The only RDS offering that doesn't require you to manage scaling is Aurora Serverless. Aurora serverless comes in two flavors, Postgres and ...
Read more >
How to create an RDS Aurora serverless instance with CDK
Amazon Aurora and Aurora Serverless is a cloud computing database service that allows applications us... Tagged with aws, devops, serverless ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found