Skip to content

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

@neilferreira

Description

@neilferreira

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-rdsRelated to Amazon Relational Databaseeffort/smallSmall work item – less than a day of effortfeature-requestA feature should be added or improved.p2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions