AWS::S3::Bucket MetadataTableConfiguration - AWS CloudFormation

AWS::S3::Bucket MetadataTableConfiguration

The metadata table configuration of an Amazon S3 general purpose bucket. For more information, see Accelerating data discovery with S3 Metadata and Setting up permissions for configuring metadata tables.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

Properties

S3TablesDestination

The destination information for the metadata table configuration. The destination table bucket must be in the same Region and AWS account as the general purpose bucket. The specified metadata table name must be unique within the aws_s3_metadata namespace in the destination table bucket.

Required: Yes

Type: S3TablesDestination

Update requires: No interruption

Examples

Create metadata table configuration

The following example creates an S3 Metadata configuration for the specified general purpose bucket. To use this example, replace amzn-s3-demo-table-bucket with the name of the table bucket where you want to store your metadata table, replace amzn-s3-demo-bucket1 with the name of your general purpose bucket, and replace my_metadata_table_name with the name that you want to use for your metadata table.

JSON

{ "Resources": { "S3TableBucket": { "Type": "AWS::S3Tables::TableBucket", "Properties": { "TableBucketName": "amzn-s3-demo-table-bucket" } }, "S3Bucket": { "Type": "AWS::S3::Bucket", "DeletionPolicy": "Retain", "Properties": { "BucketName": "amzn-s3-demo-bucket1", "MetadataTableConfiguration": { "S3TablesDestination": { "TableBucketArn": { "Fn::GetAtt": [ "S3TableBucket", "TableBucketARN" ] }, "TableName": "my_metadata_table_name", "TableNamespace": "aws_s3_metadata" } } } } } }

YAML

Resources: S3TableBucket: Type: AWS::S3Tables::TableBucket Properties: TableBucketName: amzn-s3-demo-table-bucket S3Bucket: Type: AWS::S3::Bucket DeletionPolicy: Retain Properties: BucketName: amzn-s3-demo-bucket1 MetadataTableConfiguration: S3TablesDestination: TableBucketArn: !GetAtt S3TableBucket.TableBucketARN TableName: my_metadata_table_name TableNamespace: aws_s3_metadata