# Amazon S3 Tables

Send2Bucket assumes an IAM role in your account and appends to an Iceberg table in your S3 table bucket. It signs requests to the regional endpoint, `https://s3tables.<region>.amazonaws.com/iceberg`, with SigV4 for the `s3tables` service.

## What you provide

| Setting | Example |
|---|---|
| `table_bucket_arn` | `arn:aws:s3tables:us-east-1:123456789012:bucket/analytics` |
| `region` | `us-east-1` |
| `role_arn` | `arn:aws:iam::123456789012:role/s2bucket-tables` |
| `namespace` | `s2b` (must exist) |
| `table` | `events` |

There are no stored credentials: Send2Bucket assumes the role.

For OpenTelemetry from SDKs or a Collector, see [Send OpenTelemetry to Amazon S3 Tables](../guides/opentelemetry-to-s3-tables.md).

## 1. Create the role

Use the same trust policy as for [Amazon S3](./aws-s3.md#1-create-the-role): the principal is Send2Bucket's AWS principal, shown in the dashboard, and the condition is the destination's external ID. The dashboard shows the filled-in policy.

## 2. Allow table writes

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3tables:GetTableBucket",
        "s3tables:GetNamespace",
        "s3tables:CreateTable",
        "s3tables:GetTable",
        "s3tables:GetTableMetadataLocation",
        "s3tables:UpdateTableMetadataLocation",
        "s3tables:GetTableData",
        "s3tables:PutTableData"
      ],
      "Resource": [
        "arn:aws:s3tables:us-east-1:123456789012:bucket/analytics",
        "arn:aws:s3tables:us-east-1:123456789012:bucket/analytics/table/*"
      ]
    }
  ]
}
```

## 3. Add the destination

Create the namespace in the table bucket, then enter the settings in the dashboard and select Verify. Send2Bucket creates the table with the columns in [Delivery format](../delivery-format.md#table-columns) if it is missing. An incompatible existing table is left untouched, and setup fails with `incompatible table: …`.

A batch is delivered when its Iceberg append snapshot commits. After a lost response Send2Bucket checks the table for the batch's `delivery_batch_id` before retrying.

## Query your data

- [DuckDB](../querying/duckdb.md#amazon-s3-tables): attaches the table bucket.
- [Trino](../querying/trino.md): Iceberg connector; Athena reads S3 Tables natively.
- [PostgreSQL](../querying/postgres.md): pg_duckdb, or load.
- [MySQL](../querying/mysql.md): load with DuckDB.
- [Python](../querying/python.md): Polars, PyIceberg or the duckdb package.
- [R](../querying/r.md): the duckdb package.
- [Amazon Athena](../querying/athena.md)
- [Amazon Redshift](../querying/redshift.md)
- [Snowflake](../querying/snowflake.md)
- [Apache Spark](../querying/spark.md)
- [StarRocks](../querying/starrocks.md)

To explore in a notebook or BI tool, see [Integrations](../integrations/index.md). The [querying overview](../querying/index.md) compares engines.
