GlobalTableSettingsReplicationMode

class aws_cdk.aws_dynamodb.GlobalTableSettingsReplicationMode(*values)

Bases: Enum

The replication mode for global table settings across multiple accounts.

Note: In a multi-account global table, you cannot make changes to a synchronized setting using CDK.

See:

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/V2globaltables_MA_HowItWorks.html

ExampleMetadata:

infused

Example:

import aws_cdk as cdk


app = cdk.App()

# Source table in Account A
source_stack = cdk.Stack(app, "SourceStack",
    env=cdk.Environment(region="us-east-1", account="111111111111")
)

# Region us-west-2
source_table = dynamodb.TableV2(source_stack, "SourceTable",
    table_name="MyMultiAccountTable",
    partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING),
    global_table_settings_replication_mode=dynamodb.GlobalTableSettingsReplicationMode.ALL
)
# After replica is deployed, update source stack with the ARN
source_table.grants.multi_account_replication_to("arn:aws:dynamodb:us-east-1:222222222222:table/MyMultiAccountTable")

Attributes

ALL

All synchronizable settings are replicated across all replicas.

Synchronizable settings include: billing mode, provisioned throughput, auto-scaling, on-demand throughput, warm throughput, TTL, streams view type, and GSIs.

Note: Some settings are always synchronized (key schema, LSIs) and some are never synchronized (table class, SSE, deletion protection, PITR, tags, resource policy, CCI).