Skip to main content

table_buckets

Creates, updates, deletes or gets a table_bucket resource or lists table_buckets in a region

Overview

Nametable_buckets
TypeResource
DescriptionCreates an Amazon S3 Tables table bucket in the same AWS Region where you create the AWS CloudFormation stack.
Idaws.s3tables.table_buckets

Fields

NameDatatypeDescription
table_bucket_arnstringThe Amazon Resource Name (ARN) of the table bucket to which the policy applies.
table_bucket_namestringA name for the table bucket.
unreferenced_file_removalobjectSettings governing the Unreferenced File Removal maintenance action. Unreferenced file removal identifies and deletes all objects that are not referenced by any table snapshots.
regionstringAWS region.

For more information, see AWS::S3Tables::TableBucket.

Methods

NameAccessible byRequired Params
create_resourceINSERTTableBucketName, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all table_buckets in a region.

SELECT
region,
table_bucket_arn,
table_bucket_name,
unreferenced_file_removal
FROM aws.s3tables.table_buckets
WHERE region = 'us-east-1';

Gets all properties from an individual table_bucket.

SELECT
region,
table_bucket_arn,
table_bucket_name,
unreferenced_file_removal
FROM aws.s3tables.table_buckets
WHERE region = 'us-east-1' AND data__Identifier = '<TableBucketARN>';

INSERT example

Use the following StackQL query and manifest file to create a new table_bucket resource, using stack-deploy.

/*+ create */
INSERT INTO aws.s3tables.table_buckets (
TableBucketName,
region
)
SELECT
'{{ TableBucketName }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.s3tables.table_buckets
WHERE data__Identifier = '<TableBucketARN>'
AND region = 'us-east-1';

Permissions

To operate on the table_buckets resource, the following permissions are required:

Create

s3tables:CreateTableBucket,
s3tables:PutTableBucketMaintenanceConfiguration,
s3tables:GetTableBucket,
s3tables:GetTableBucketMaintenanceConfiguration

Read

s3tables:GetTableBucket,
s3tables:GetTableBucketMaintenanceConfiguration

Update

s3tables:PutTableBucketMaintenanceConfiguration,
s3tables:GetTableBucket,
s3tables:GetTableBucketMaintenanceConfiguration

Delete

s3tables:DeleteTableBucket

List

s3tables:ListTableBuckets