aws-cdk-lib.aws_dynamodb.UtilizationScalingProps

interface UtilizationScalingProps

LanguageType name
.NETAmazon.CDK.AWS.DynamoDB.UtilizationScalingProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsdynamodb#UtilizationScalingProps
Javasoftware.amazon.awscdk.services.dynamodb.UtilizationScalingProps
Pythonaws_cdk.aws_dynamodb.UtilizationScalingProps
TypeScript (source)aws-cdk-lib » aws_dynamodb » UtilizationScalingProps

Properties for enabling DynamoDB utilization tracking.

Example

const globalTable = new dynamodb.Table(this, 'Table', {
  partitionKey: { name: 'id', type: dynamodb.AttributeType.STRING },
  replicationRegions: ['us-east-1', 'us-east-2', 'us-west-2'],
  billingMode: dynamodb.BillingMode.PROVISIONED,
});

globalTable.autoScaleWriteCapacity({
  minCapacity: 1,
  maxCapacity: 10,
}).scaleOnUtilization({ targetUtilizationPercent: 75 });

Properties

NameTypeDescription
targetUtilizationPercentnumberTarget utilization percentage for the attribute.
disableScaleIn?booleanIndicates whether scale in by the target tracking policy is disabled.
policyName?stringA name for the scaling policy.
scaleInCooldown?DurationPeriod after a scale in activity completes before another scale in activity can start.
scaleOutCooldown?DurationPeriod after a scale out activity completes before another scale out activity can start.

targetUtilizationPercent

Type: number

Target utilization percentage for the attribute.


disableScaleIn?

Type: boolean (optional, default: false)

Indicates whether scale in by the target tracking policy is disabled.

If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource.


policyName?

Type: string (optional, default: Automatically generated name.)

A name for the scaling policy.


scaleInCooldown?

Type: Duration (optional, default: Duration.seconds(300) for the following scalable targets: ECS services, Spot Fleet requests, EMR clusters, AppStream 2.0 fleets, Aurora DB clusters, Amazon SageMaker endpoint variants, Custom resources. For all other scalable targets, the default value is Duration.seconds(0): DynamoDB tables, DynamoDB global secondary indexes, Amazon Comprehend document classification endpoints, Lambda provisioned concurrency)

Period after a scale in activity completes before another scale in activity can start.


scaleOutCooldown?

Type: Duration (optional, default: Duration.seconds(300) for the following scalable targets: ECS services, Spot Fleet requests, EMR clusters, AppStream 2.0 fleets, Aurora DB clusters, Amazon SageMaker endpoint variants, Custom resources. For all other scalable targets, the default value is Duration.seconds(0): DynamoDB tables, DynamoDB global secondary indexes, Amazon Comprehend document classification endpoints, Lambda provisioned concurrency)

Period after a scale out activity completes before another scale out activity can start.