Skip to content

Creates an S3 Metadata V2 metadata configuration for a general purpose bucket

Description

Creates an S3 Metadata V2 metadata configuration for a general purpose bucket. For more information, see Accelerating data discovery with S3 Metadata in the Amazon S3 User Guide.

Permissions

To use this operation, you must have the following permissions. For more information, see Setting up permissions for configuring metadata tables in the Amazon S3 User Guide.

If you want to encrypt your metadata tables with server-side encryption with Key Management Service (KMS) keys (SSE-KMS), you need additional permissions in your KMS key policy. For more information, see Setting up permissions for configuring metadata tables in the Amazon S3 User Guide.

If you also want to integrate your table bucket with Amazon Web Services analytics services so that you can query your metadata table, you need additional permissions. For more information, see Integrating Amazon S3 Tables with Amazon Web Services analytics services in the Amazon S3 User Guide.

To query your metadata tables, you need additional permissions. For more information, see Permissions for querying metadata tables in the Amazon S3 User Guide.

  • s3:CreateBucketMetadataTableConfiguration

    The IAM policy action name is the same for the V1 and V2 API operations.

  • s3tables:CreateTableBucket

  • s3tables:CreateNamespace

  • s3tables:GetTable

  • s3tables:CreateTable

  • s3tables:PutTablePolicy

  • s3tables:PutTableBucketPolicy

  • s3tables:PutTableEncryption

  • kms:DescribeKey

  • iam:PassRole - required if you include an AnnotationTableConfiguration with an IAM role.

The following operations are related to create_bucket_metadata_configuration:

If you include an AnnotationTableConfiguration with an IAM role, the role must have a trust policy that allows the Amazon S3 metadata service to assume it, and a permissions policy that grants the actions needed to read annotations from your bucket. The following examples show a trust policy and a permissions policy that you can adapt for your bucket and account.

You must URL encode any signed header values that contain spaces. For example, if your header value is my file.txt, containing two spaces after my, you must URL encode this value to my%20%20file.txt.

Usage

s3_create_bucket_metadata_configuration(Bucket, ContentMD5,
  ChecksumAlgorithm, MetadataConfiguration, ExpectedBucketOwner)

Arguments

  • Bucket

    [required] The general purpose bucket that you want to create the metadata configuration for.

  • ContentMD5

    The Content-MD5 header for the metadata configuration.

  • ChecksumAlgorithm

    The checksum algorithm to use with your metadata configuration.

  • MetadataConfiguration

    [required] The contents of your metadata configuration.

  • ExpectedBucketOwner

    The expected owner of the general purpose bucket that corresponds to your metadata configuration.

Value

An empty list.

Request syntax

svc$create_bucket_metadata_configuration(
  Bucket = "string",
  ContentMD5 = "string",
  ChecksumAlgorithm = "CRC32"|"CRC32C"|"SHA1"|"SHA256"|"CRC64NVME"|"SHA512"|"MD5"|"XXHASH64"|"XXHASH3"|"XXHASH128",
  MetadataConfiguration = list(
    JournalTableConfiguration = list(
      RecordExpiration = list(
        Expiration = "ENABLED"|"DISABLED",
        Days = 123
      ),
      EncryptionConfiguration = list(
        SseAlgorithm = "aws:kms"|"AES256",
        KmsKeyArn = "string"
      )
    ),
    InventoryTableConfiguration = list(
      ConfigurationState = "ENABLED"|"DISABLED",
      EncryptionConfiguration = list(
        SseAlgorithm = "aws:kms"|"AES256",
        KmsKeyArn = "string"
      )
    ),
    AnnotationTableConfiguration = list(
      ConfigurationState = "ENABLED"|"DISABLED",
      EncryptionConfiguration = list(
        SseAlgorithm = "aws:kms"|"AES256",
        KmsKeyArn = "string"
      ),
      Role = "string"
    )
  ),
  ExpectedBucketOwner = "string"
)