Cannot update serverless aurora maxCapacity with CfnDBCluster
See original GitHub issueIf 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:
- Created 4 years ago
- Reactions:1
- Comments:18 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.