EnableScalingProps

class aws_cdk.aws_dynamodb.EnableScalingProps(*, max_capacity, min_capacity)

Bases: object

Properties for enabling DynamoDB capacity scaling.

Parameters:
  • max_capacity (Union[int, float]) – Maximum capacity to scale to.

  • min_capacity (Union[int, float]) – Minimum capacity to scale to.

ExampleMetadata:

infused

Example:

global_table = dynamodb.Table(self, "Table",
    partition_key=dynamodb.Attribute(name="id", type=dynamodb.AttributeType.STRING),
    replication_regions=["us-east-1", "us-east-2", "us-west-2"],
    billing_mode=dynamodb.BillingMode.PROVISIONED
)

global_table.auto_scale_write_capacity(
    min_capacity=1,
    max_capacity=10
).scale_on_utilization(target_utilization_percent=75)

Attributes

max_capacity

Maximum capacity to scale to.

min_capacity

Minimum capacity to scale to.