aws-cdk-lib.aws_dynamodb.EnableScalingProps

interface EnableScalingProps

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

Properties for enabling DynamoDB capacity scaling.

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
maxCapacitynumberMaximum capacity to scale to.
minCapacitynumberMinimum capacity to scale to.

maxCapacity

Type: number

Maximum capacity to scale to.


minCapacity

Type: number

Minimum capacity to scale to.