Skip to main content

table_replications

Creates, updates, deletes, gets or lists a table_replications resource.

Overview

Nametable_replications
TypeResource
Idaws.s3tables.table_replications

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
configurationobjectThe replication configuration for the table, including the IAM role and replication rules.
version_tokenstringA version token that represents the current state of the table's replication configuration. Use this token when updating the configuration to ensure consistency.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_table_replicationselecttableArn, regionRetrieves the replication configuration for a specific table. Permissions You must have the s3tables:GetTableReplication permission to use this operation.
put_table_replicationreplacetableArn, region, configurationversionTokenCreates or updates the replication configuration for a specific table. This operation allows you to define table-level replication independently of bucket-level replication, providing granular control over which tables are replicated and where. Permissions You must have the s3tables:PutTableReplication permission to use this operation. The IAM role specified in the configuration must have permissions to read from the source table and write to all destination tables. You must also have the following permissions: s3tables:GetTable permission on the source table being replicated. s3tables:CreateTable permission for the destination. s3tables:CreateNamespace permission for the destination. s3tables:GetTableMaintenanceConfig permission for the source table. s3tables:PutTableMaintenanceConfig permission for the destination table. You must have iam:PassRole permission with condition allowing roles to be passed to replication.s3tables.amazonaws.com.
delete_table_replicationdeletetableArn, versionToken, regionDeletes the replication configuration for a specific table. After deletion, new updates to this table will no longer be replicated to destination tables, though existing replicated copies will remain in destination buckets. Permissions You must have the s3tables:DeleteTableReplication permission to use this operation.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
tableArnstringThe Amazon Resource Name (ARN) of the table.
versionTokenstringA version token from a previous GetTableReplication call. Use this token to ensure you're deleting the expected version of the configuration.
versionTokenstringA version token from a previous GetTableReplication call. Use this token to ensure you're updating the expected version of the configuration.

SELECT examples

Retrieves the replication configuration for a specific table. Permissions You must have the s3tables:GetTableReplication permission to use this operation.

SELECT
configuration,
version_token
FROM aws.s3tables.table_replications
WHERE tableArn = '{{ tableArn }}' -- required
AND region = '{{ region }}' -- required
;

REPLACE examples

Creates or updates the replication configuration for a specific table. This operation allows you to define table-level replication independently of bucket-level replication, providing granular control over which tables are replicated and where. Permissions You must have the s3tables:PutTableReplication permission to use this operation. The IAM role specified in the configuration must have permissions to read from the source table and write to all destination tables. You must also have the following permissions: s3tables:GetTable permission on the source table being replicated. s3tables:CreateTable permission for the destination. s3tables:CreateNamespace permission for the destination. s3tables:GetTableMaintenanceConfig permission for the source table. s3tables:PutTableMaintenanceConfig permission for the destination table. You must have iam:PassRole permission with condition allowing roles to be passed to replication.s3tables.amazonaws.com.

REPLACE aws.s3tables.table_replications
SET
configuration = '{{ configuration }}'
WHERE
tableArn = '{{ tableArn }}' --required
AND region = '{{ region }}' --required
AND configuration = '{{ configuration }}' --required
AND versionToken = '{{ versionToken}}'
RETURNING
status,
version_token;

DELETE examples

Deletes the replication configuration for a specific table. After deletion, new updates to this table will no longer be replicated to destination tables, though existing replicated copies will remain in destination buckets. Permissions You must have the s3tables:DeleteTableReplication permission to use this operation.

DELETE FROM aws.s3tables.table_replications
WHERE tableArn = '{{ tableArn }}' --required
AND versionToken = '{{ versionToken }}' --required
AND region = '{{ region }}' --required
;