interface TableV2MultiAccountReplicaProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.DynamoDB.TableV2MultiAccountReplicaProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsdynamodb#TableV2MultiAccountReplicaProps |
Java | software.amazon.awscdk.services.dynamodb.TableV2MultiAccountReplicaProps |
Python | aws_cdk.aws_dynamodb.TableV2MultiAccountReplicaProps |
TypeScript (source) | aws-cdk-lib » aws_dynamodb » TableV2MultiAccountReplicaProps |
Implements
Table
Properties for creating a multi-account replica table.
Note: partitionKey, sortKey, and localSecondaryIndexes are not options because CloudFormation automatically inherits the key schema and LSIs from the source table via globalTableSourceArn.
Example
import * as cdk from 'aws-cdk-lib';
const app = new cdk.App();
// Source table in Account A
const sourceStack = new cdk.Stack(app, 'SourceStack', {
env: { region: 'us-east-2', account: '111111111111' },
});
const sourceTable = new dynamodb.TableV2(sourceStack, 'SourceTable', {
tableName: 'MyMultiAccountTable',
partitionKey: { name: 'pk', type: dynamodb.AttributeType.STRING },
globalTableSettingsReplicationMode: dynamodb.GlobalTableSettingsReplicationMode.ALL,
});
// Replica stack in Account B
const replicaStack = new cdk.Stack(app, 'ReplicaStack', {
env: { region: 'us-east-1', account: '222222222222' },
});
// Create replica - permissions are automatically configured
const replica = new dynamodb.TableV2MultiAccountReplica(replicaStack, 'ReplicaTable', {
tableName: 'MyMultiAccountTable',
replicaSourceTable: sourceTable,
globalTableSettingsReplicationMode: dynamodb.GlobalTableSettingsReplicationMode.ALL,
});
Properties
| Name | Type | Description |
|---|---|---|
| contributor | boolean | Whether CloudWatch contributor insights is enabled. |
| contributor | Contributor | Whether CloudWatch contributor insights is enabled and what mode is selected. |
| deletion | boolean | Whether deletion protection is enabled. |
| encryption? | Table | The server-side encryption configuration for the replica table. |
| global | Global | Controls whether table settings are synchronized across replicas. |
| grant | boolean | Whether or not to grant permissions for all indexes of the table. |
| kinesis | IStream | Kinesis Data Stream to capture item level changes. |
| point | boolean | Whether point-in-time recovery is enabled. |
| point | Point | Whether point-in-time recovery is enabled and recoveryPeriodInDays is set. |
| removal | Removal | The removal policy applied to the table. |
| replica | ITable | The source table to replicate from. |
| resource | Policy | Resource policy to assign to DynamoDB Table. |
| table | Table | The table class. |
| table | string | Enforces a particular physical table name. |
| tags? | Cfn[] | Tags to be applied to the primary table (default replica table). |
contributorInsights?
⚠️ Deprecated: use contributorInsightsSpecification instead
Type:
boolean
(optional, default: false)
Whether CloudWatch contributor insights is enabled.
contributorInsightsSpecification?
Type:
Contributor
(optional, default: contributor insights is not enabled)
Whether CloudWatch contributor insights is enabled and what mode is selected.
deletionProtection?
Type:
boolean
(optional, default: false)
Whether deletion protection is enabled.
encryption?
Type:
Table
(optional, default: TableEncryptionV2.dynamoOwnedKey())
The server-side encryption configuration for the replica table.
Note: Each replica manages its own encryption independently. This is not synchronized across replicas.
globalTableSettingsReplicationMode?
Type:
Global
(optional, default: GlobalTableSettingsReplicationMode.ALL)
Controls whether table settings are synchronized across replicas.
When set to ALL, synchronizable settings (billing mode, throughput, TTL, streams view type, GSIs) are automatically replicated across all replicas. When set to NONE, each replica manages its own settings independently (billing mode must be PAY_PER_REQUEST).
Note: Some settings are always synchronized (key schema, LSIs) regardless of this setting, and some are never synchronized (table class, SSE, deletion protection, PITR, tags, resource policy).
grantIndexPermissions?
Type:
boolean
(optional, default: false)
Whether or not to grant permissions for all indexes of the table.
Note: If false, permissions will only be granted to indexes when globalIndexes is specified.
kinesisStream?
Type:
IStream
(optional, default: no Kinesis Data Stream)
Kinesis Data Stream to capture item level changes.
pointInTimeRecovery?
⚠️ Deprecated: use pointInTimeRecoverySpecification instead
Type:
boolean
(optional, default: false - point in time recovery is not enabled.)
Whether point-in-time recovery is enabled.
pointInTimeRecoverySpecification?
Type:
Point
(optional, default: point in time recovery is not enabled.)
Whether point-in-time recovery is enabled and recoveryPeriodInDays is set.
removalPolicy?
Type:
Removal
(optional, default: RemovalPolicy.RETAIN)
The removal policy applied to the table.
replicaSourceTable?
Type:
ITable
(optional, default: must be provided)
The source table to replicate from.
[disable-awslint:prefer-ref-interface]
resourcePolicy?
Type:
Policy
(optional, default: No resource policy statements are added to the created table.)
Resource policy to assign to DynamoDB Table.
tableClass?
Type:
Table
(optional, default: TableClass.STANDARD)
The table class.
tableName?
Type:
string
(optional, default: generated by CloudFormation)
Enforces a particular physical table name.
tags?
Type:
Cfn[]
(optional, default: no tags)
Tags to be applied to the primary table (default replica table).

.NET
Go
Java
Python
TypeScript (