AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

TableV2MultiAccountReplica

A multi-account replica of a DynamoDB table. This construct represents a replica table in a different AWS account from the source table. It inherits the schema (partition key, sort key, and indexes) from the source table. Permissions on the replica side are automatically configured. You must manually add permissions to the source table using `sourceTable.grants.nultiAccountReplicationTo(replica.tableArn)`.

Import

import { TableV2MultiAccountReplica } from 'aws-cdk-lib/aws-dynamodb';

Or use the module namespace:

import * as dynamodb from 'aws-cdk-lib/aws-dynamodb';
// dynamodb.TableV2MultiAccountReplica

Properties

Configuration passed to the constructor as TableV2MultiAccountReplicaProps.

encryptionOptional
TableEncryptionV2

The server-side encryption configuration for the replica table. Note: Each replica manages its own encryption independently. This is not synchronized across replicas.

Default: TableEncryptionV2.dynamoOwnedKey()

globalTableSettingsReplicationModeOptional
GlobalTableSettingsReplicationMode

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).

Default: GlobalTableSettingsReplicationMode.ALL

grantIndexPermissionsOptional
boolean

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.

Default: false

removalPolicyOptional
RemovalPolicy

The removal policy applied to the table.

Default: RemovalPolicy.RETAIN

replicaSourceTableOptional
ITableV2

The source table to replicate from. [disable-awslint:prefer-ref-interface]

Default: - must be provided

tableNameOptional
string

Enforces a particular physical table name.

Default: - generated by CloudFormation

9 properties inherited from TableOptionsV2
contributorInsightsOptionalDeprecatedinherited from TableOptionsV2
boolean

Whether CloudWatch contributor insights is enabled.

Default: false

Deprecated: use `contributorInsightsSpecification` instead

contributorInsightsSpecificationOptionalinherited from TableOptionsV2
ContributorInsightsSpecification

Whether CloudWatch contributor insights is enabled and what mode is selected.

Default: - contributor insights is not enabled

deletionProtectionOptionalinherited from TableOptionsV2
boolean

Whether deletion protection is enabled.

Default: false

kinesisStreamOptionalinherited from TableOptionsV2
IStream

Kinesis Data Stream to capture item level changes.

Default: - no Kinesis Data Stream

pointInTimeRecoveryOptionalDeprecatedinherited from TableOptionsV2
boolean

Whether point-in-time recovery is enabled.

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

Deprecated: use `pointInTimeRecoverySpecification` instead

pointInTimeRecoverySpecificationOptionalinherited from TableOptionsV2
PointInTimeRecoverySpecification

Whether point-in-time recovery is enabled and recoveryPeriodInDays is set.

Default: - point in time recovery is not enabled.

resourcePolicyOptionalinherited from TableOptionsV2
PolicyDocument

Resource policy to assign to DynamoDB Table.

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

tableClassOptionalinherited from TableOptionsV2
TableClass

The table class.

Default: TableClass.STANDARD

tagsOptionalinherited from TableOptionsV2
CfnTag[]

Tags to be applied to the primary table (default replica table).

Default: - no tags

Get the Amazon DynamoDB Cheat Sheet

Everything you need to know about Amazon DynamoDB on one page. HD quality, print-friendly.

Download Free Infographic