table_replications
Creates, updates, deletes, gets or lists a table_replications resource.
Overview
| Name | table_replications |
| Type | Resource |
| Id | aws.s3tables.table_replications |
Fields
The following fields are returned by SELECT queries:
- get_table_replication
| Name | Datatype | Description |
|---|---|---|
configuration | object | The replication configuration for the table, including the IAM role and replication rules. |
version_token | string | A 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_table_replication | select | tableArn, region | Retrieves the replication configuration for a specific table. Permissions You must have the s3tables:GetTableReplication permission to use this operation. | |
put_table_replication | replace | tableArn, region, configuration | versionToken | 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. |
delete_table_replication | delete | tableArn, versionToken, region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
tableArn | string | The Amazon Resource Name (ARN) of the table. |
versionToken | string | A version token from a previous GetTableReplication call. Use this token to ensure you're deleting the expected version of the configuration. |
versionToken | string | A version token from a previous GetTableReplication call. Use this token to ensure you're updating the expected version of the configuration. |
SELECT examples
- get_table_replication
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
- put_table_replication
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
- delete_table_replication
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
;