Skip to content
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

(rds): DatabaseCluster is missing the ability to specify SecondsUntilAutoPause on ServerlessV2ScalingConfiguration #32563

Open
1 of 2 tasks
neilferreira opened this issue Dec 18, 2024 · 2 comments
Assignees
Labels
@aws-cdk/aws-rds Related to Amazon Relational Database effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. p2

Comments

@neilferreira
Copy link
Contributor

Describe the feature

Serverless V2 provides the ability to set the minimum and maximum capacity of a Serverless V2 DB cluster. Alongside these properties, are the ability to dictate the number of seconds of inactivity that must be reached for the database to be auto paused.

The ability to specify SecondsUntilAutoPause is missing from CDK.

Use Case

To be able to automatically pause my database after a period of inactivity, with the default of 5 minutes being too low.

Proposed Solution

Update

serverlessV2ScalingConfiguration: Lazy.any({
produce: () => {
if (this.hasServerlessInstance) {
return {
minCapacity: this.serverlessV2MinCapacity,
maxCapacity: this.serverlessV2MaxCapacity,
};
}
return undefined;
},
}),
to include SecondsUntilAutoPause as per https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbcluster-serverlessv2scalingconfiguration.html

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

v2.173.2

Environment details (OS name and version, etc.)

Any

@neilferreira neilferreira added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Dec 18, 2024
@github-actions github-actions bot added the @aws-cdk/aws-rds Related to Amazon Relational Database label Dec 18, 2024
@khushail khushail added the investigating This issue is being investigated and/or work is in progress to resolve the issue. label Dec 18, 2024
@khushail khushail self-assigned this Dec 18, 2024
@khushail khushail added p2 and removed needs-triage This issue or PR still needs to be triaged. labels Dec 18, 2024
@khushail
Copy link
Contributor

Hi @neilferreira , thanks for requesting this.

On checking the cloudfrormation docs, here are my findings -

  1. Cloudformation PR for adding this secondsUntilPause property merged just 15 hrs ago -feat(sources): update cfn-schema cdklabs/awscdk-service-spec#1502
├[~] service aws-rds
│ └ resources
│    └[~] resource AWS::RDS::DBCluster
│      └ types
│         └[~] type ServerlessV2ScalingConfiguration
│           └ properties
│              └[+] SecondsUntilAutoPause: integer
  1. The Cloudformation document mentioning the L1 construct is still pending this update -https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_rds.CfnDBCluster.ServerlessV2ScalingConfigurationProperty.html
  2. Cloudformation resource specification doc is also missing the update -https://d1uauaxba7bl26.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json
Screenshot 2024-12-18 at 11 18 27 AM

So I would request you to wait for sometime before it becomes available at L1 construct. Once that is done, pls feel free to submit a PR for the CDK L2 construct support.

Hope that would be helpful.
Thanks.

@khushail khushail added needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. effort/small Small work item – less than a day of effort and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Dec 18, 2024
@mazyu36
Copy link
Contributor

mazyu36 commented Dec 22, 2024

FYI: L1 is available now. #32582

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-rds Related to Amazon Relational Database effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. p2
Projects
None yet
Development

No branches or pull requests

3 participants