# TableV2MultiAccountReplicaProps

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.

Extends: [TableOptionsV2](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.TableOptionsV2.html)
Used as props by: [TableV2MultiAccountReplica](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.TableV2MultiAccountReplica.html)

- Source: [`aws-dynamodb/lib/table-v2.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-dynamodb/lib/table-v2.ts#L472)
- Type last changed: v2.239.0 · 19 Feb 2026

## Example

TypeScript:

```ts
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,
});
```

Python:

```python
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-2", account="111111111111")
)

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
)

# Replica stack in Account B
replica_stack = cdk.Stack(app, "ReplicaStack",
    env=cdk.Environment(region="us-east-1", account="222222222222")
)

# Create replica - permissions are automatically configured
replica = dynamodb.TableV2MultiAccountReplica(replica_stack, "ReplicaTable",
    table_name="MyMultiAccountTable",
    replica_source_table=source_table,
    global_table_settings_replication_mode=dynamodb.GlobalTableSettingsReplicationMode.ALL
)
```

Java:

```java
import software.amazon.awscdk.*;

App app = new App();

// Source table in Account A
Stack sourceStack = Stack.Builder.create(app, "SourceStack")
        .env(Environment.builder().region("us-east-2").account("111111111111").build())
        .build();

TableV2 sourceTable = TableV2.Builder.create(sourceStack, "SourceTable")
        .tableName("MyMultiAccountTable")
        .partitionKey(Attribute.builder().name("pk").type(AttributeType.STRING).build())
        .globalTableSettingsReplicationMode(GlobalTableSettingsReplicationMode.ALL)
        .build();

// Replica stack in Account B
Stack replicaStack = Stack.Builder.create(app, "ReplicaStack")
        .env(Environment.builder().region("us-east-1").account("222222222222").build())
        .build();

// Create replica - permissions are automatically configured
TableV2MultiAccountReplica replica = TableV2MultiAccountReplica.Builder.create(replicaStack, "ReplicaTable")
        .tableName("MyMultiAccountTable")
        .replicaSourceTable(sourceTable)
        .globalTableSettingsReplicationMode(GlobalTableSettingsReplicationMode.ALL)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
using Amazon.CDK;

var app = new App();

// Source table in Account A
var sourceStack = new Stack(app, "SourceStack", new StackProps {
    Env = new Environment { Region = "us-east-2", Account = "111111111111" }
});

var sourceTable = new TableV2(sourceStack, "SourceTable", new TablePropsV2 {
    TableName = "MyMultiAccountTable",
    PartitionKey = new Attribute { Name = "pk", Type = AttributeType.STRING },
    GlobalTableSettingsReplicationMode = GlobalTableSettingsReplicationMode.ALL
});

// Replica stack in Account B
var replicaStack = new Stack(app, "ReplicaStack", new StackProps {
    Env = new Environment { Region = "us-east-1", Account = "222222222222" }
});

// Create replica - permissions are automatically configured
var replica = new TableV2MultiAccountReplica(replicaStack, "ReplicaTable", new TableV2MultiAccountReplicaProps {
    TableName = "MyMultiAccountTable",
    ReplicaSourceTable = sourceTable,
    GlobalTableSettingsReplicationMode = GlobalTableSettingsReplicationMode.ALL
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
import "github.com/aws/aws-cdk-go/awscdk"

app := cdk.NewApp()

// Source table in Account A
sourceStack := cdk.NewStack(app, jsii.String("SourceStack"), &StackProps{
	Env: &Environment{
		Region: jsii.String("us-east-2"),
		Account: jsii.String("111111111111"),
	},
})

sourceTable := dynamodb.NewTableV2(sourceStack, jsii.String("SourceTable"), &TablePropsV2{
	TableName: jsii.String("MyMultiAccountTable"),
	PartitionKey: &Attribute{
		Name: jsii.String("pk"),
		Type: dynamodb.AttributeType_STRING,
	},
	GlobalTableSettingsReplicationMode: dynamodb.GlobalTableSettingsReplicationMode_ALL,
})

// Replica stack in Account B
replicaStack := cdk.NewStack(app, jsii.String("ReplicaStack"), &StackProps{
	Env: &Environment{
		Region: jsii.String("us-east-1"),
		Account: jsii.String("222222222222"),
	},
})

// Create replica - permissions are automatically configured
replica := dynamodb.NewTableV2MultiAccountReplica(replicaStack, jsii.String("ReplicaTable"), &TableV2MultiAccountReplicaProps{
	TableName: jsii.String("MyMultiAccountTable"),
	ReplicaSourceTable: sourceTable,
	GlobalTableSettingsReplicationMode: dynamodb.GlobalTableSettingsReplicationMode_ALL,
})
```

## Properties

- `contributorInsights`: boolean = false — use `contributorInsightsSpecification` instead

- `contributorInsightsSpecification`: [ContributorInsightsSpecification](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.ContributorInsightsSpecification.html) — Whether CloudWatch contributor insights is enabled and what mode is selected.

  **Default:** contributor insights is not enabled

- `deletionProtection`: boolean = false — Whether deletion protection is enabled.

- `encryption`: [TableEncryptionV2](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.TableEncryptionV2.html) — The server-side encryption configuration for the replica table.

  **Default:** TableEncryptionV2.dynamoOwnedKey()

  Note: Each replica manages its own encryption independently. This is not synchronized
  across replicas.

- `globalTableSettingsReplicationMode`: [GlobalTableSettingsReplicationMode](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.GlobalTableSettingsReplicationMode.html) — Controls whether table settings are synchronized across replicas.

  **Default:** GlobalTableSettingsReplicationMode.ALL

  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`: boolean = 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`: [IStream](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kinesis.IStream.html) — Kinesis Data Stream to capture item level changes.

  **Default:** no Kinesis Data Stream

- `pointInTimeRecovery`: boolean — use `pointInTimeRecoverySpecification` instead

  **Default:** false - point in time recovery is not enabled.

- `pointInTimeRecoverySpecification`: [PointInTimeRecoverySpecification](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.PointInTimeRecoverySpecification.html) — Whether point-in-time recovery is enabled and recoveryPeriodInDays is set.

  **Default:** point in time recovery is not enabled.

- `removalPolicy`: [RemovalPolicy](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.RemovalPolicy.html) = RemovalPolicy.RETAIN — The removal policy applied to the table.

- `replicaSourceTable`: [ITableV2](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.ITableV2.html) — The source table to replicate from.

  **Default:** must be provided

  [disable-awslint:prefer-ref-interface]

- `resourcePolicy`: [PolicyDocument](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.PolicyDocument.html) — Resource policy to assign to DynamoDB Table.

  **Default:** No resource policy statements are added to the created table.

- `streamResourcePolicy`: [PolicyDocument](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.PolicyDocument.html) — Resource policy to assign to DynamoDB Stream.

  **Default:** No resource policy statements are added to the stream.

- `tableClass`: [TableClass](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.TableClass.html) = TableClass.STANDARD — The table class.

- `tableName`: string — Enforces a particular physical table name.

  **Default:** generated by CloudFormation

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — Tags to be applied to the primary table (default replica table).

  **Default:** no tags
