---
title: "PUT /tables/{tableBucketARN}/{namespace}"
method: PUT
path: "/tables/{tableBucketARN}/{namespace}"
---

# PUT /tables/{tableBucketARN}/{namespace}

`PUT /tables/{tableBucketARN}/{namespace}`

Creates a new table associated with the given namespace in a table bucket. For more information, see [Creating an Amazon S3 table](https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-create.html) in the _Amazon Simple Storage Service User Guide_.

Permissions

*   You must have the `s3tables:CreateTable` permission to use this operation.
    
*   If you use this operation with the optional `metadata` request parameter you must have the `s3tables:PutTableData` permission.
    
*   If you use this operation with the optional `encryptionConfiguration` request parameter you must have the `s3tables:PutTableEncryption` permission.
    
*   If you use this operation with the `storageClassConfiguration` request parameter, you must have the `s3tables:PutTableStorageClass` permission.
    
*   To create a table with tags, you must have the `s3tables:TagResource` permission in addition to `s3tables:CreateTable` permission.
    

Additionally, If you choose SSE-KMS encryption you must grant the S3 Tables maintenance principal access to your KMS key. For more information, see [Permissions requirements for S3 Tables SSE-KMS encryption](https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-kms-permissions.html).

## Path parameters

- `tableBucketARN` string, required
- `namespace` string, required

## Request body

- object
  - `name` string, required — The name for the table.
  - `format` 'ICEBERG', required — The format for the table.
  - `metadata` object — Contains details about the table metadata.
    - `iceberg` object — Contains details about the metadata of an Iceberg table.
      - `schema` object — The schema for an Iceberg table. Use this property to define table schemas with primitive types only. For schemas that include nested or complex types such as <code>struct</code>, <code>list</code>, or <code>map</code>, use <code>schemaV2</code> instead.
        - `fields` SchemaField[], required — The schema fields for the table
          - `id` integer — An optional unique identifier for the schema field. Field IDs are used by Apache Iceberg to track schema evolution and maintain compatibility across schema changes. If not specified, S3 Tables automatically assigns field IDs.
          - `name` string, required — The name of the field.
          - `type` string, required — The field type. S3 Tables supports all Apache Iceberg primitive types. For more information, see the <a href="https://iceberg.apache.org/spec/#primitive-types">Apache Iceberg documentation</a>.
          - `required` boolean — A Boolean value that specifies whether values are required for each row in this field. By default, this is <code>false</code> and null values are allowed in the field. If this is <code>true</code> the field does not allow null values.
      - `schemaV2` object — The schema for an Iceberg table using the V2 format. Use this property to define table schemas that include nested or complex data types such as <code>struct</code>, <code>list</code>, or <code>map</code>, in addition to primitive types. For schemas with only primitive types, you can use either <code>schema</code> or <code>schemaV2</code>.
        - `type` 'struct', required — The type of the top-level schema, which is always a <code>struct</code> type as defined in the <a href="https://iceberg.apache.org/spec/#schemas-and-data-types">Apache Iceberg specification</a>. This value must be <code>struct</code>.
        - `fields` SchemaV2Field[], required — The schema fields for the table. Each field defines a column in the table, including its name, type, and whether it is required.
          - `id` integer, required — The unique identifier for the schema field. Field IDs are used by Apache Iceberg to track schema evolution and maintain compatibility across schema changes.
          - `name` string, required — The name of the field.
          - `type` object, required — The data type of the field. This can be a primitive type string such as <code>boolean</code>, <code>int</code>, <code>long</code>, <code>float</code>, <code>double</code>, <code>string</code>, <code>binary</code>, <code>date</code>, <code>timestamp</code>, or <code>timestamptz</code>, or a complex type represented as a JSON object for nested types such as <code>struct</code>, <code>list</code>, or <code>map</code>. For more information, see the <a href="https://iceberg.apache.org/spec/#schemas-and-data-types">Apache Iceberg schemas and data types documentation</a>.
          - `required` boolean, required — A Boolean value that specifies whether values are required for each row in this field. If this is <code>true</code>, the field does not allow null values.
          - `doc` string — An optional description of the field.
        - `schemaId` integer — An optional unique identifier for the schema. Schema IDs are used by Apache Iceberg to track schema evolution.
        - `identifierFieldIds` Integer[] — A list of field IDs that are used as the identifier fields for the table. Identifier fields uniquely identify a row in the table.
      - `partitionSpec` object — The partition specification for the Iceberg table. Partitioning organizes data into separate files based on the values of one or more fields, which can improve query performance by reducing the amount of data scanned. Each partition field applies a transform (such as identity, year, month, or bucket) to a single field.
        - `fields` IcebergPartitionField[], required — The list of partition fields that define how the table data is partitioned. Each field specifies a source field and a transform to apply. This field is required if <code>partitionSpec</code> is provided.
          - `sourceId` integer, required — The ID of the source schema field to partition by. This must reference a valid field ID from the table schema.
          - `transform` string, required — The partition transform to apply to the source field. Supported transforms include <code>identity</code>, <code>year</code>, <code>month</code>, <code>day</code>, <code>hour</code>, <code>bucket</code>, and <code>truncate</code>. For more information, see the <a href="https://iceberg.apache.org/spec/#partition-transforms">Apache Iceberg partition transforms documentation</a>.
          - `name` string, required — The name for this partition field. This name is used in the partitioned file paths.
          - `fieldId` integer — An optional unique identifier for this partition field. If not specified, S3 Tables automatically assigns a field ID.
        - `specId` integer — The unique identifier for this partition specification. If not specified, defaults to <code>0</code>.
      - `writeOrder` object — The sort order for the Iceberg table. Sort order defines how data is sorted within data files, which can improve query performance by enabling more efficient data skipping and filtering.
        - `orderId` integer, required — The unique identifier for this sort order. If not specified, defaults to <code>1</code>. The order ID is used by Apache Iceberg to track sort order evolution.
        - `fields` IcebergSortField[], required — The list of sort fields that define how data is sorted within files. Each field specifies a source field, sort direction, and null ordering. This field is required if <code>writeOrder</code> is provided.
          - `sourceId` integer, required — The ID of the source schema field to sort by. This must reference a valid field ID from the table schema.
          - `transform` string, required — The transform to apply to the source field before sorting. Use <code>identity</code> to sort by the field value directly, or specify other transforms as needed.
          - `direction` 'asc' | 'desc', required — The sort direction. Valid values are <code>asc</code> for ascending order or <code>desc</code> for descending order.
          - `nullOrder` 'nulls-first' | 'nulls-last', required — Specifies how null values are ordered. Valid values are <code>nulls-first</code> to place nulls before non-null values, or <code>nulls-last</code> to place nulls after non-null values.
      - `properties` unknown
  - `encryptionConfiguration` object — Configuration specifying how data should be encrypted. This structure defines the encryption algorithm and optional KMS key to be used for server-side encryption.
    - `sseAlgorithm` 'AES256' | 'aws:kms' — The server-side encryption algorithm to use. Valid values are <code>AES256</code> for S3-managed encryption keys, or <code>aws:kms</code> for Amazon Web Services KMS-managed encryption keys. If you choose SSE-KMS encryption you must grant the S3 Tables maintenance principal access to your KMS key. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-kms-permissions.html">Permissions requirements for S3 Tables SSE-KMS encryption</a>.
    - `kmsKeyArn` string — The Amazon Resource Name (ARN) of the KMS key to use for encryption. This field is required only when <code>sseAlgorithm</code> is set to <code>aws:kms</code>.
  - `storageClassConfiguration` object — The configuration details for the storage class of tables or table buckets. This allows you to optimize storage costs by selecting the appropriate storage class based on your access patterns and performance requirements.
    - `storageClass` 'STANDARD' | 'INTELLIGENT_TIERING' — The storage class for the table or table bucket. Valid values include storage classes optimized for different access patterns and cost profiles.
  - `tags` object — <p>A map of user-defined tags that you would like to apply to the table that you are creating. A tag is a key-value pair that you apply to your resources. Tags can help you organize, track costs for, and control access to resources. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html">Tagging for cost allocation or attribute-based access control (ABAC)</a>.</p> <note> <p>You must have the <code>s3tables:TagResource</code> permission in addition to <code>s3tables:CreateTable</code> permission to create a table with tags.</p> </note>

## Response `200`

Success

- CreateTableResponse
  - `tableARN` string, required — The Amazon Resource Name (ARN) of the table.
  - `versionToken` string, required — The version token of the table.

## Other responses

- `480` — InternalServerErrorException
- `481` — ForbiddenException
- `482` — NotFoundException
- `483` — TooManyRequestsException
- `484` — ConflictException
- `485` — BadRequestException

---

[API](https://skmtc.net/aws/apis/s3tables.md) · [All operations](https://skmtc.net/aws/apis/s3tables/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/s3tables/versions/d7413f19d46e/schema)
