Closed tehnrd closed 3 days ago
This feature is amazing and I've seen @mazyu36 on https://github.com/aws/aws-cdk/pull/32231
Thank you.
Workaround to avoid the validation:
const cluster = new rds.DatabaseCluster(this, 'Cluster', {
engine,
vpc,
serverlessV2MinCapacity: 0.5,
serverlessV2MaxCapacity: 2.0,
writer: rds.ClusterInstance.serverlessV2(this.writerId, {
autoMinorVersionUpgrade: true,
publiclyAccessible: false,
}),
storageEncrypted: true,
removalPolicy: RemovalPolicy.DESTROY,
parameterGroup: new rds.ParameterGroup(this, 'ParameterGroup', {
engine,
parameters: {
// Terminate idle session for Aurora Serverless V2 auto-pause
idle_session_timeout: '60000',
},
}),
});
// ADD THIS!
(cluster.node.defaultChild as CfnResource).addPropertyOverride('ServerlessV2ScalingConfiguration.MinCapacity', 0);
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one.
Describe the feature
Aurora Serverless V2 now allows scaling to zero (https://aws.amazon.com/blogs/database/introducing-scaling-to-0-capacity-with-amazon-aurora-serverless-v2/), but there is validation in CDK that prevents any values less than
0.5
.This validation needs to be removed.
Use Case
You should be able to scale the Aurora Serverless V2 cluster to 0.
Proposed Solution
Modfity
/packages/aws-cdk-lib/aws-rds/lib/cluster.ts
and remove the greater that0.5
validation.Other Information
No response
Acknowledgements
CDK version used
2.168.0
Environment details (OS name and version, etc.)
OSX 15.0 (24A335)