Amazon S3 Tables

2026/11/29 - Amazon S3 Tables - 6 new api methods

Changes  Adds support for S3 Tables metrics in S3 Storage Lens and adds support for direct streaming ingestion with PutRows

PutStorageLensConfiguration (new) Link ¶

Creates a new Amazon S3 Storage Lens for Tables configuration, or replaces an existing configuration that has the same ID. A configuration reports daily metrics about how the data in your table buckets is stored, accessed, and maintained. For more information, see Gaining visibility into your S3 Tables storage activity and usage with Amazon S3 Storage Lens for Tables in the Amazon Simple Storage Service User Guide. For a complete list of S3 Storage Lens for Tables metrics, see Amazon S3 Storage Lens for Tables metrics glossary in the Amazon Simple Storage Service User Guide.

The Amazon Web Services Region that you send the request to becomes the configuration's home Region, and you can't change it later. You can create a configuration only in a supported home Region.

Permissions

To use this operation, you must have the following permissions:

  • s3tables:PutStorageLensConfiguration

  • s3tables:TagResource – Required if you specify tags.

  • s3tables:UntagResource – Required if the request removes tags from an existing configuration.

  • s3tables:CreateTableBucket and s3tables:PutTableBucketPolicy – Required if you enable storageLensTableDestination. S3 Storage Lens uses them to create the Amazon Web Services managed table bucket aws-s3 in your account.

  • organizations:DescribeOrganization and organizations:ListAWSServiceAccessForOrganization – Required if you specify awsOrg.

  • organizations:ListDelegatedAdministrators – Required if you specify awsOrg in a delegated administrator account.

  • iam:CreateServiceLinkedRole – Required if you specify awsOrg and the service-linked role AWSServiceRoleForS3StorageLens doesn't exist in your account.

For more information, see Setting Amazon S3 Storage Lens for Tables permissions in the Amazon Simple Storage Service User Guide.

See also: AWS API Documentation

Request Syntax

client.put_storage_lens_configuration(
    storageLensId='string',
    storageLensConfiguration={
        'id': 'string',
        'advancedMetricsCategories': [
            'ActivityMetrics'|'MaintenanceMetrics'|'StorageMetrics',
        ],
        'include': {
            'tableBuckets': [
                'string',
            ],
            'regions': [
                'string',
            ]
        },
        'exclude': {
            'tableBuckets': [
                'string',
            ],
            'regions': [
                'string',
            ]
        },
        'dataExport': {
            'cloudWatchMetrics': {
                'isEnabled': True|False
            },
            's3BucketDestination': {
                'format': 'CSV'|'Parquet',
                'outputSchemaVersion': 'V_1',
                'accountId': 'string',
                'arn': 'string',
                'prefix': 'string',
                'encryption': {
                    'sseAlgorithm': 'AES256'|'aws:kms',
                    'kmsKeyArn': 'string'
                }
            },
            'storageLensTableDestination': {
                'isEnabled': True|False,
                'encryption': {
                    'sseAlgorithm': 'AES256'|'aws:kms',
                    'kmsKeyArn': 'string'
                }
            }
        },
        'isEnabled': True|False,
        'awsOrg': {
            'arn': 'string'
        },
        'storageLensArn': 'string'
    },
    tags={
        'string': 'string'
    }
)
type storageLensId:

string

param storageLensId:

[REQUIRED]

The ID of the S3 Storage Lens configuration. It must match the id in storageLensConfiguration.

type storageLensConfiguration:

dict

param storageLensConfiguration:

[REQUIRED]

The S3 Storage Lens configuration.

  • id (string) -- [REQUIRED]

    The ID of the S3 Storage Lens configuration. In a PutStorageLensConfiguration request, it must match storageLensId.

  • advancedMetricsCategories (list) -- [REQUIRED]

    The metrics categories that S3 Storage Lens collects advanced metrics for. Every configuration includes the basic storage metrics. Advanced metrics are optional and incur charges. To collect only the basic storage metrics, specify an empty list. Each category can appear in the list only once. Valid values:

    • StorageMetrics - How much data your tables store, such as meterable bytes and file counts by Apache Iceberg file type (data files, delete files, metadata files, and manifest files), and each table's maintenance settings. Specify this category to collect the advanced storage metrics in addition to the basic storage metrics.

    • ActivityMetrics - How your tables are accessed, such as request counts by request type, bytes uploaded and downloaded, error counts by status code, and request latency.

    • MaintenanceMetrics - What managed table maintenance did, such as the outcomes of compaction, unreferenced file removal, and snapshot expiration, including the files that each operation removed and any errors that occurred.

    • (string) --

      A category of S3 Storage Lens for Tables metrics.

  • include (dict) --

    The table buckets and Regions to include in the configuration. You can specify include or exclude, but not both. If you specify include, it must contain at least one table bucket or Region.

    • tableBuckets (list) --

      The Amazon Resource Names (ARNs) of the table buckets, up to 50.

      • (string) --

    • regions (list) --

      The Regions, such as us-east-1, up to 50. A configuration can report on table buckets in Regions other than its home Region.

      • (string) --

  • exclude (dict) --

    The table buckets and Regions to exclude from the configuration. You can specify include or exclude, but not both. If you specify exclude, it must contain at least one table bucket or Region.

    • tableBuckets (list) --

      The Amazon Resource Names (ARNs) of the table buckets, up to 50.

      • (string) --

    • regions (list) --

      The Regions, such as us-east-1, up to 50. A configuration can report on table buckets in Regions other than its home Region.

      • (string) --

  • dataExport (dict) --

    The properties of your S3 Storage Lens metrics export, including the destinations, schema, and format. If you specify dataExport, you must specify at least one destination.

    • cloudWatchMetrics (dict) --

      Specifies whether S3 Storage Lens publishes metrics to Amazon CloudWatch.

      • isEnabled (boolean) -- [REQUIRED]

        Specifies whether the feature is enabled.

    • s3BucketDestination (dict) --

      The general purpose bucket that S3 Storage Lens exports metrics files to.

      • format (string) -- [REQUIRED]

        The format of the export files.

      • outputSchemaVersion (string) -- [REQUIRED]

        The schema version of the export files.

      • accountId (string) -- [REQUIRED]

        The ID of the account that owns the bucket.

      • arn (string) -- [REQUIRED]

        The Amazon Resource Name (ARN) of the bucket, such as arn:aws:s3:::amzn-s3-demo-bucket.

      • prefix (string) --

        The prefix in the bucket where S3 Storage Lens delivers the export files.

      • encryption (dict) --

        The server-side encryption for the export files. To use SSE-KMS, set sseAlgorithm to aws:kms and specify kmsKeyArn. The KMS key must be in the same Region as the configuration.

        • sseAlgorithm (string) -- [REQUIRED]

          The server-side encryption algorithm to use. Valid values are AES256 for S3-managed encryption keys, or aws:kms 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 Permissions requirements for S3 Tables SSE-KMS encryption.

        • kmsKeyArn (string) --

          The Amazon Resource Name (ARN) of the KMS key to use for encryption. This field is required only when sseAlgorithm is set to aws:kms.

    • storageLensTableDestination (dict) --

      Specifies whether S3 Storage Lens exports metrics to read-only tables in the Amazon Web Services managed table bucket aws-s3.

      • isEnabled (boolean) -- [REQUIRED]

        Specifies whether the export to tables is enabled. When set to true, S3 Storage Lens exports metrics to tables in addition to any other destinations that you configure.

      • encryption (dict) --

        The server-side encryption for the tables that S3 Storage Lens exports metrics to. To use SSE-KMS, set sseAlgorithm to aws:kms and specify kmsKeyArn. The KMS key must be in the same Region as the configuration. After S3 Storage Lens creates the tables, you can't change their encryption.

        • sseAlgorithm (string) -- [REQUIRED]

          The server-side encryption algorithm to use. Valid values are AES256 for S3-managed encryption keys, or aws:kms 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 Permissions requirements for S3 Tables SSE-KMS encryption.

        • kmsKeyArn (string) --

          The Amazon Resource Name (ARN) of the KMS key to use for encryption. This field is required only when sseAlgorithm is set to aws:kms.

  • isEnabled (boolean) -- [REQUIRED]

    Specifies whether the S3 Storage Lens configuration is enabled.

  • awsOrg (dict) --

    The Amazon Web Services organization for an organization-level configuration. To create an organization-level configuration, you must send the request from the organization's management account or from a delegated administrator account for S3 Storage Lens, and trusted access for S3 Storage Lens must be enabled in Amazon Web Services Organizations. An organization-level configuration can't include or exclude specific table buckets.

    • arn (string) --

      The Amazon Resource Name (ARN) of the Amazon Web Services organization that your account belongs to, such as arn:aws:organizations::111122223333:organization/o-exampleorgid.

  • storageLensArn (string) --

    The Amazon Resource Name (ARN) of the S3 Storage Lens configuration, such as arn:aws:s3tables:us-east-1:111122223333:storage-lens/example-configuration. This property is read-only. S3 Storage Lens ignores it in a PutStorageLensConfiguration request.

type tags:

dict

param tags:

A map of user-defined tags that you would like to apply to the S3 Storage Lens configuration. 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 Tagging for cost allocation or attribute-based access control (ABAC).

If you specify tags for an existing configuration, they replace all of its tags. To remove all of its tags, specify an empty map. If you don't specify tags, the existing tags don't change. A configuration can have up to 50 tags.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'arn': 'string'
}

Response Structure

  • (dict) --

    • arn (string) --

      The Amazon Resource Name (ARN) of the S3 Storage Lens configuration.

DeleteStorageLensConfiguration (new) Link ¶

Deletes an Amazon S3 Storage Lens for Tables configuration. Send the request to the configuration's home Region. For more information, see Gaining visibility into your S3 Tables storage activity and usage with Amazon S3 Storage Lens for Tables in the Amazon Simple Storage Service User Guide.

Permissions

You must have the s3tables:DeleteStorageLensConfiguration permission to use this operation. For more information, see Setting Amazon S3 Storage Lens for Tables permissions in the Amazon Simple Storage Service User Guide.

See also: AWS API Documentation

Request Syntax

client.delete_storage_lens_configuration(
    storageLensId='string'
)
type storageLensId:

string

param storageLensId:

[REQUIRED]

The ID of the S3 Storage Lens configuration.

returns:

None

PutRows (new) Link ¶

The PutRows operation writes rows to a channel of a table in Amazon S3 Tables, so that you can stream data into the table.

The following limits apply to each request:

  • The maximum payload size is 50 MiB (52,428,800 bytes). If the payload is larger, the request fails with a BadRequestException error.

  • The maximum number of rows in a payload is 500,000. If the payload contains more rows, the request fails with a BadRequestException error.

  • Only the default channel is supported. If you specify any other channelId, the request fails with a BadRequestException error.

You can gzip-compress the request body and set Content-Encoding: gzip. The 50 MiB limit applies to the request body and, if the body is compressed, also to the decompressed body. The data decoded from the payload is also limited to 50 MiB.

To send Avro, set payloadFormat to AVRO. The payload of each request must be a single Apache Avro Object Container File (OCF) with at least one row. To write more files, send a separate request for each one. Each field of the writer schema must match a column of the table. The row limit counts the rows in the file.

Permissions

To use this operation, you must have all of the following permissions on the table. Amazon S3 Tables doesn't have a separate s3tables:PutRows permission.

  • s3tables:GetTableData

  • s3tables:PutTableData

  • s3tables:GetTableMetadataLocation

  • s3tables:UpdateTableMetadataLocation

See also: AWS API Documentation

Request Syntax

client.put_rows(
    tableARN='string',
    channelId='string',
    payload=b'bytes'|file,
    payloadFormat='JSON'|'AVRO',
    checksumAlgorithm='CRC32'|'CRC32C'|'CRC64NVME'|'SHA1'|'SHA256'
)
type tableARN:

string

param tableARN:

[REQUIRED]

The Amazon Resource Name (ARN) of the table to write rows to.

type channelId:

string

param channelId:

The identifier of the channel to write rows to. If you don't specify a channel, the operation uses default. Only default is supported.

type payload:

bytes or seekable file-like object

param payload:

[REQUIRED]

The rows to write, encoded in the format that you specify in payloadFormat. The maximum payload size is 50 MiB (52,428,800 bytes), and the maximum number of rows is 500,000.

type payloadFormat:

string

param payloadFormat:

[REQUIRED]

Specifies the format of the rows in payload. The following values are valid:

  • JSON – Newline-delimited JSON: each row is one JSON object on its own line.

  • AVRO – Apache Avro data in the Object Container File (OCF) format. Other Avro encodings, such as single-object encoding or Avro data without the container, aren't accepted. Each field of the writer schema must match a column of the table.

type checksumAlgorithm:

string

param checksumAlgorithm:

(Optional) The algorithm to use to calculate the checksum of the payload. Each PutRows request must include a payload checksum. If you use an AWS SDK, the SDK calculates the checksum for you. If the checksum doesn't match the payload, the request fails with a BadRequestException error.

rtype:

dict

returns:

Response Syntax

{
    'acceptedRows': 123
}

Response Structure

  • (dict) --

    • acceptedRows (integer) --

      The number of rows that the channel accepted.

ListStorageLensConfigurations (new) Link ¶

Lists the Amazon S3 Storage Lens for Tables configurations in your account whose home Region is the Region that you send the request to. For more information, see Gaining visibility into your S3 Tables storage activity and usage with Amazon S3 Storage Lens for Tables in the Amazon Simple Storage Service User Guide.

Results are paginated. To get the next page of results, pass the nextToken from a response in your next request. Continue until a response has no nextToken.

Permissions

You must have the s3tables:ListStorageLensConfigurations permission to use this operation. For more information, see Setting Amazon S3 Storage Lens for Tables permissions in the Amazon Simple Storage Service User Guide.

See also: AWS API Documentation

Request Syntax

client.list_storage_lens_configurations(
    nextToken='string'
)
type nextToken:

string

param nextToken:

The nextToken from a previous response, to get the next page of results.

rtype:

dict

returns:

Response Syntax

{
    'nextToken': 'string',
    'storageLensConfigurations': [
        {
            'homeRegion': 'string',
            'id': 'string',
            'storageLensArn': 'string',
            'isEnabled': True|False
        },
    ]
}

Response Structure

  • (dict) --

    • nextToken (string) --

      A token to pass as nextToken to get the next page of results. If there are no more results, this value isn't returned.

    • storageLensConfigurations (list) --

      The S3 Storage Lens configurations.

      • (dict) --

        Contains details about an S3 Storage Lens configuration.

        • homeRegion (string) --

          The home Region of the S3 Storage Lens configuration. S3 Storage Lens stores the configuration's metrics in this Region.

        • id (string) --

          The ID of the S3 Storage Lens configuration.

        • storageLensArn (string) --

          The Amazon Resource Name (ARN) of the S3 Storage Lens configuration.

        • isEnabled (boolean) --

          Specifies whether the S3 Storage Lens configuration is enabled.

GetChannel (new) Link ¶

Gets the current state of a table's channel in Amazon S3 Tables.

The operation returns the following information about the channel:

  • The state of the channel

  • The approximate number of rows that the channel has buffered and not yet committed to the table

  • An error code and a message that describe the error, if an error blocks commits

The default channel is created the first time that PutRows writes to the table. Until then, GetChannel fails with a NotFoundException error.

Permissions

To use this operation, you must have the s3tables:GetChannel permission on the table.

See also: AWS API Documentation

Request Syntax

client.get_channel(
    tableARN='string',
    channelId='string'
)
type tableARN:

string

param tableARN:

[REQUIRED]

The Amazon Resource Name (ARN) of the table that the channel belongs to.

type channelId:

string

param channelId:

The identifier of the channel whose state you want to get. If you don't specify a channel, the operation uses default. Only default is supported.

rtype:

dict

returns:

Response Syntax

{
    'state': 'active'|'failing',
    'approximateNumberOfBufferedRows': 123,
    'errorCode': 'kms_key_disabled'|'kms_access_denied'|'kms_key_not_found',
    'errorMessage': 'string'
}

Response Structure

  • (dict) --

    • state (string) --

      The current state of the channel. The state is one of the following values:

      • active – The channel is operating normally.

      • failing – The channel can't commit rows to the table because of an error that requires your action. For details, see errorCode and errorMessage.

    • approximateNumberOfBufferedRows (integer) --

      The approximate number of rows that the channel has buffered and not yet committed to the table.

    • errorCode (string) --

      The code of the error that's blocking the channel from committing buffered rows to the table. For how to fix each error, see ChannelErrorCode. GetChannel returns this value only when state is failing.

    • errorMessage (string) --

      A message that describes the error in errorCode. GetChannel returns this value only together with errorCode.

GetStorageLensConfiguration (new) Link ¶

Gets an Amazon S3 Storage Lens for Tables configuration. Send the request to the configuration's home Region. For more information, see Gaining visibility into your S3 Tables storage activity and usage with Amazon S3 Storage Lens for Tables in the Amazon Simple Storage Service User Guide. For a complete list of S3 Storage Lens for Tables metrics, see Amazon S3 Storage Lens for Tables metrics glossary in the Amazon Simple Storage Service User Guide.

Permissions

You must have the s3tables:GetStorageLensConfiguration permission to use this operation. For more information, see Setting Amazon S3 Storage Lens for Tables permissions in the Amazon Simple Storage Service User Guide.

See also: AWS API Documentation

Request Syntax

client.get_storage_lens_configuration(
    storageLensId='string'
)
type storageLensId:

string

param storageLensId:

[REQUIRED]

The ID of the S3 Storage Lens configuration.

rtype:

dict

returns:

Response Syntax

{
    'storageLensConfiguration': {
        'id': 'string',
        'advancedMetricsCategories': [
            'ActivityMetrics'|'MaintenanceMetrics'|'StorageMetrics',
        ],
        'include': {
            'tableBuckets': [
                'string',
            ],
            'regions': [
                'string',
            ]
        },
        'exclude': {
            'tableBuckets': [
                'string',
            ],
            'regions': [
                'string',
            ]
        },
        'dataExport': {
            'cloudWatchMetrics': {
                'isEnabled': True|False
            },
            's3BucketDestination': {
                'format': 'CSV'|'Parquet',
                'outputSchemaVersion': 'V_1',
                'accountId': 'string',
                'arn': 'string',
                'prefix': 'string',
                'encryption': {
                    'sseAlgorithm': 'AES256'|'aws:kms',
                    'kmsKeyArn': 'string'
                }
            },
            'storageLensTableDestination': {
                'isEnabled': True|False,
                'encryption': {
                    'sseAlgorithm': 'AES256'|'aws:kms',
                    'kmsKeyArn': 'string'
                }
            }
        },
        'isEnabled': True|False,
        'awsOrg': {
            'arn': 'string'
        },
        'storageLensArn': 'string'
    }
}

Response Structure

  • (dict) --

    • storageLensConfiguration (dict) --

      The S3 Storage Lens configuration.

      • id (string) --

        The ID of the S3 Storage Lens configuration. In a PutStorageLensConfiguration request, it must match storageLensId.

      • advancedMetricsCategories (list) --

        The metrics categories that S3 Storage Lens collects advanced metrics for. Every configuration includes the basic storage metrics. Advanced metrics are optional and incur charges. To collect only the basic storage metrics, specify an empty list. Each category can appear in the list only once. Valid values:

        • StorageMetrics - How much data your tables store, such as meterable bytes and file counts by Apache Iceberg file type (data files, delete files, metadata files, and manifest files), and each table's maintenance settings. Specify this category to collect the advanced storage metrics in addition to the basic storage metrics.

        • ActivityMetrics - How your tables are accessed, such as request counts by request type, bytes uploaded and downloaded, error counts by status code, and request latency.

        • MaintenanceMetrics - What managed table maintenance did, such as the outcomes of compaction, unreferenced file removal, and snapshot expiration, including the files that each operation removed and any errors that occurred.

        • (string) --

          A category of S3 Storage Lens for Tables metrics.

      • include (dict) --

        The table buckets and Regions to include in the configuration. You can specify include or exclude, but not both. If you specify include, it must contain at least one table bucket or Region.

        • tableBuckets (list) --

          The Amazon Resource Names (ARNs) of the table buckets, up to 50.

          • (string) --

        • regions (list) --

          The Regions, such as us-east-1, up to 50. A configuration can report on table buckets in Regions other than its home Region.

          • (string) --

      • exclude (dict) --

        The table buckets and Regions to exclude from the configuration. You can specify include or exclude, but not both. If you specify exclude, it must contain at least one table bucket or Region.

        • tableBuckets (list) --

          The Amazon Resource Names (ARNs) of the table buckets, up to 50.

          • (string) --

        • regions (list) --

          The Regions, such as us-east-1, up to 50. A configuration can report on table buckets in Regions other than its home Region.

          • (string) --

      • dataExport (dict) --

        The properties of your S3 Storage Lens metrics export, including the destinations, schema, and format. If you specify dataExport, you must specify at least one destination.

        • cloudWatchMetrics (dict) --

          Specifies whether S3 Storage Lens publishes metrics to Amazon CloudWatch.

          • isEnabled (boolean) --

            Specifies whether the feature is enabled.

        • s3BucketDestination (dict) --

          The general purpose bucket that S3 Storage Lens exports metrics files to.

          • format (string) --

            The format of the export files.

          • outputSchemaVersion (string) --

            The schema version of the export files.

          • accountId (string) --

            The ID of the account that owns the bucket.

          • arn (string) --

            The Amazon Resource Name (ARN) of the bucket, such as arn:aws:s3:::amzn-s3-demo-bucket.

          • prefix (string) --

            The prefix in the bucket where S3 Storage Lens delivers the export files.

          • encryption (dict) --

            The server-side encryption for the export files. To use SSE-KMS, set sseAlgorithm to aws:kms and specify kmsKeyArn. The KMS key must be in the same Region as the configuration.

            • sseAlgorithm (string) --

              The server-side encryption algorithm to use. Valid values are AES256 for S3-managed encryption keys, or aws:kms 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 Permissions requirements for S3 Tables SSE-KMS encryption.

            • kmsKeyArn (string) --

              The Amazon Resource Name (ARN) of the KMS key to use for encryption. This field is required only when sseAlgorithm is set to aws:kms.

        • storageLensTableDestination (dict) --

          Specifies whether S3 Storage Lens exports metrics to read-only tables in the Amazon Web Services managed table bucket aws-s3.

          • isEnabled (boolean) --

            Specifies whether the export to tables is enabled. When set to true, S3 Storage Lens exports metrics to tables in addition to any other destinations that you configure.

          • encryption (dict) --

            The server-side encryption for the tables that S3 Storage Lens exports metrics to. To use SSE-KMS, set sseAlgorithm to aws:kms and specify kmsKeyArn. The KMS key must be in the same Region as the configuration. After S3 Storage Lens creates the tables, you can't change their encryption.

            • sseAlgorithm (string) --

              The server-side encryption algorithm to use. Valid values are AES256 for S3-managed encryption keys, or aws:kms 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 Permissions requirements for S3 Tables SSE-KMS encryption.

            • kmsKeyArn (string) --

              The Amazon Resource Name (ARN) of the KMS key to use for encryption. This field is required only when sseAlgorithm is set to aws:kms.

      • isEnabled (boolean) --

        Specifies whether the S3 Storage Lens configuration is enabled.

      • awsOrg (dict) --

        The Amazon Web Services organization for an organization-level configuration. To create an organization-level configuration, you must send the request from the organization's management account or from a delegated administrator account for S3 Storage Lens, and trusted access for S3 Storage Lens must be enabled in Amazon Web Services Organizations. An organization-level configuration can't include or exclude specific table buckets.

        • arn (string) --

          The Amazon Resource Name (ARN) of the Amazon Web Services organization that your account belongs to, such as arn:aws:organizations::111122223333:organization/o-exampleorgid.

      • storageLensArn (string) --

        The Amazon Resource Name (ARN) of the S3 Storage Lens configuration, such as arn:aws:s3tables:us-east-1:111122223333:storage-lens/example-configuration. This property is read-only. S3 Storage Lens ignores it in a PutStorageLensConfiguration request.