-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DatabaseCluster: serverlessV2MinCapacity should allow scaling to 0 #32234
Labels
@aws-cdk/aws-rds
Related to Amazon Relational Database
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p2
Comments
tehnrd
added
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
labels
Nov 21, 2024
github-actions
bot
added
the
@aws-cdk/aws-rds
Related to Amazon Relational Database
label
Nov 21, 2024
This was referenced Nov 21, 2024
pahud
added
p2
effort/medium
Medium work item – several days of effort
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Nov 21, 2024
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. |
mazyu36
added a commit
to mazyu36/aws-cdk
that referenced
this issue
Nov 27, 2024
Closes aws#32234. Amazon Aurora Serverless v2 supports scaling to zero capacity. Ref: https://aws.amazon.com/about-aws/whats-new/2024/11/amazon-aurora-serverless-v2-scaling-zero-capacity/ "Updated validation to permit zero as a value for `serverlessV2MinCapacity`. Fix unit tests and add an integ test. - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
@aws-cdk/aws-rds
Related to Amazon Relational Database
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p2
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)
The text was updated successfully, but these errors were encountered: