interface ServerlessScalingOptions
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.RDS.ServerlessScalingOptions |
Java | software.amazon.awscdk.services.rds.ServerlessScalingOptions |
Python | aws_cdk.aws_rds.ServerlessScalingOptions |
TypeScript (source) | @aws-cdk/aws-rds » ServerlessScalingOptions |
Options for configuring scaling on an Aurora Serverless cluster.
Example
declare const vpc: ec2.Vpc;
const cluster = new rds.ServerlessCluster(this, 'AnotherCluster', {
engine: rds.DatabaseClusterEngine.AURORA_POSTGRESQL,
parameterGroup: rds.ParameterGroup.fromParameterGroupName(this, 'ParameterGroup', 'default.aurora-postgresql10'),
vpc,
scaling: {
autoPause: Duration.minutes(10), // default is to pause after 5 minutes of idle time
minCapacity: rds.AuroraCapacityUnit.ACU_8, // default is 2 Aurora capacity units (ACUs)
maxCapacity: rds.AuroraCapacityUnit.ACU_32, // default is 16 Aurora capacity units (ACUs)
}
});
Properties
Name | Type | Description |
---|---|---|
auto | Duration | The time before an Aurora Serverless database cluster is paused. |
max | Aurora | The maximum capacity for an Aurora Serverless database cluster. |
min | Aurora | The minimum capacity for an Aurora Serverless database cluster. |
autoPause?
Type:
Duration
(optional, default: automatic pause enabled after 5 minutes)
The time before an Aurora Serverless database cluster is paused.
A database cluster can be paused only when it is idle (it has no connections). Auto pause time must be between 5 minutes and 1 day.
If a DB cluster is paused for more than seven days, the DB cluster might be backed up with a snapshot. In this case, the DB cluster is restored when there is a request to connect to it.
Set to 0 to disable
maxCapacity?
Type:
Aurora
(optional, default: determined by Aurora based on database engine)
The maximum capacity for an Aurora Serverless database cluster.
minCapacity?
Type:
Aurora
(optional, default: determined by Aurora based on database engine)
The minimum capacity for an Aurora Serverless database cluster.