> ## Documentation Index
> Fetch the complete documentation index at: https://docs.streamnative.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Open Catalog for Iceberg on AWS

This guide describes how to prepare a Snowflake Open Catalog (Polaris) for use with StreamNative Ursa as an Iceberg catalog on AWS.

> **Important:** Polaris does not support reading buckets from a different region. The StreamNative Ursa cluster, the storage bucket, and the Polaris catalog must all reside in the **same AWS region**.

## Prerequisites

* A Snowflake standard account
* An AWS account with permissions to create S3 buckets and IAM roles
* Access to the Snowflake Open Catalog feature (request via your Snowflake account team if not yet enabled)

## 1. Create a Snowflake Open Catalog Account

The Snowflake Open Catalog console requires a dedicated **Open Catalog** account. From the standard Snowflake console, navigate to **Admin -> Accounts** and use the toggle to **Create Snowflake Open Catalog Account**.

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-01.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=b0b7b289efef24082eeb7582c1b286a2" alt="Snowflake console" width="1920" height="931" data-path="images/ursa-lakehouse/open-catalog-aws-01.webp" />

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-02.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=7e51c6e8f257be300730fb2baf269a74" alt="Create Open Catalog account" width="1920" height="934" data-path="images/ursa-lakehouse/open-catalog-aws-02.webp" />

Configure the account with:

* **Cloud:** AWS
* **Region:** the region in which your S3 bucket resides (for example, `US East (Ohio)`)
* **Edition:** any

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-03.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=c448e16b442bdc442f7c9f658bc65d23" alt="Account configuration" width="1920" height="934" data-path="images/ursa-lakehouse/open-catalog-aws-03.webp" />

Provide an admin username and password.

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-04.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=3947b6975361a32197dcc7bdabdf5636" alt="Account credentials" width="1920" height="935" data-path="images/ursa-lakehouse/open-catalog-aws-04.webp" />

After creation, click the **Account URL** to sign in to the Open Catalog console.

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-05.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=8c4dda065d740695f790bd660b9e330d" alt="Account created" width="1920" height="1918" data-path="images/ursa-lakehouse/open-catalog-aws-05.webp" />

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-06.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=fafde342491215cba7415e2773ceec17" alt="Open Catalog console" width="1920" height="933" data-path="images/ursa-lakehouse/open-catalog-aws-06.webp" />

## 2. Create an S3 Bucket

Create an S3 bucket in the same region as the Open Catalog account.

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-09.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=43dc80eea8ea3d89f3e467f243a9acf7" alt="Create bucket" width="1920" height="639" data-path="images/ursa-lakehouse/open-catalog-aws-09.webp" />

## 3. Create an IAM Policy

Navigate to **AWS IAM -> Policies -> Create policy**.

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-10.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=099689fcca5368d51a541bae7d5155f9" alt="Create policy" width="1920" height="935" data-path="images/ursa-lakehouse/open-catalog-aws-10.webp" />

Paste the following policy, replacing the bucket name and subpath with your values:

```json theme={null}
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3:PutObject",
        "s3:GetObject",
        "s3:GetObjectVersion",
        "s3:DeleteObject",
        "s3:DeleteObjectVersion"
      ],
      "Resource": "arn:aws:s3:::<your-bucket>/<your-subpath>/*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "s3:ListBucket",
        "s3:GetBucketLocation"
      ],
      "Resource": "arn:aws:s3:::<your-bucket>/<your-subpath>",
      "Condition": {
        "StringLike": {
          "s3:prefix": ["*"]
        }
      }
    }
  ]
}
```

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-11.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=aa581f746a25242f9cf0ee7f903891da" alt="Policy JSON" width="1920" height="984" data-path="images/ursa-lakehouse/open-catalog-aws-11.webp" />

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-12.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=f3e5d9713d0f65a7626e7f9e97d89c32" alt="Policy next step" width="1920" height="972" data-path="images/ursa-lakehouse/open-catalog-aws-12.webp" />

## 4. Create an IAM Role

Navigate to **AWS IAM -> Roles -> Create role** and configure:

* **Trusted entity type:** AWS account
* **An AWS account:** This account
* **Enable External ID** with a unique value (you will reference this when creating the Polaris catalog)

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-13.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=47443df40659af2c8bd68f5653672c11" alt="Create role" width="1920" height="937" data-path="images/ursa-lakehouse/open-catalog-aws-13.webp" />

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-14.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=130c019310130e73175f68e02d0b2ceb" alt="Trust settings" width="1920" height="982" data-path="images/ursa-lakehouse/open-catalog-aws-14.webp" />

Attach the policy created in step 4.

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-15.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=b6b7eb2f74c18fa9994fa5e38eb1e726" alt="Attach policy" width="1920" height="649" data-path="images/ursa-lakehouse/open-catalog-aws-15.webp" />

Provide a role name and create the role.

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-16.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=f7d45b6261d9e3fd919c1920bf212798" alt="Save role" width="1920" height="980" data-path="images/ursa-lakehouse/open-catalog-aws-16.webp" />

Record the role ARN (for example, `arn:aws:iam::<account-id>:role/<role-name>`).

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-17.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=7910a27ba1241ee50bea668d1c5418e2" alt="Role ARN" width="1920" height="822" data-path="images/ursa-lakehouse/open-catalog-aws-17.webp" />

## 5. Create the Polaris Catalog

In the Snowflake Open Catalog console, create a new catalog.

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-18.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=4805bff51bbc6f37c5aa033b4e8f7c52" alt="Create catalog" width="1920" height="935" data-path="images/ursa-lakehouse/open-catalog-aws-18.webp" />

Configure the catalog with:

* **External:** disabled
* **Storage provider:** S3
* **Default base location:** `s3://<your-bucket>/<your-subpath>` (the path from step 3)
* **S3 role ARN:** the role ARN recorded in step 5
* **External ID:** the External ID configured in step 5

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-19.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=57e8a24f9cbcbd2e524a0c5e61b9026b" alt="Catalog configuration" width="1920" height="847" data-path="images/ursa-lakehouse/open-catalog-aws-19.webp" />

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-20.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=865100ff17daef03ab68d3c49ce67f75" alt="Catalog created" width="1920" height="429" data-path="images/ursa-lakehouse/open-catalog-aws-20.webp" />

Open the catalog details and record the **IAM user ARN** that Polaris uses to access AWS. You will use this in step 7 to update the trust policy of the IAM role.

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-21.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=4ff56287efa43598a08fb8adb090989b" alt="Catalog IAM user ARN" width="1920" height="569" data-path="images/ursa-lakehouse/open-catalog-aws-21.webp" />

## 6. Update the IAM Role Trust Policy

Return to the AWS IAM console, open the role created in step 5, and edit the trust relationship.

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-22.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=abb5344624d86eefdb7b55a7a6705ff3" alt="Find role" width="1920" height="802" data-path="images/ursa-lakehouse/open-catalog-aws-22.webp" />

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-23.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=b6158514d0d2a071da5b30b5e39878ab" alt="Edit trust policy" width="1920" height="896" data-path="images/ursa-lakehouse/open-catalog-aws-23.webp" />

Update `Principal.AWS` to the Polaris IAM user ARN recorded in step 6.

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-24.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=6185a17f0277793e07e1489997e5417d" alt="Update trust policy" width="1920" height="967" data-path="images/ursa-lakehouse/open-catalog-aws-24.webp" />

Click **Update policy**.

## 7. Create a Connection (Service Principal)

In the Open Catalog console, create a new connection that StreamNative Ursa will use to authenticate.

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-25.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=293c02803713b99689708ccccf848a94" alt="Create connection" width="1920" height="931" data-path="images/ursa-lakehouse/open-catalog-aws-25.webp" />

Configure with:

* **Name:** any name
* **Create new principal role:** enabled
* **Principal Role Name:** any name

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-26.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=c45a74ca47e39cb4189211ee7e01d8a1" alt="Connection configuration" width="1920" height="657" data-path="images/ursa-lakehouse/open-catalog-aws-26.webp" />

After creation, record the **Client ID** and **Client Secret** -- the secret cannot be retrieved later.

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-27.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=b6a3f48aea505ca7cfd453bcdb7821cd" alt="Connection credentials" width="1920" height="936" data-path="images/ursa-lakehouse/open-catalog-aws-27.webp" />

## 8. Create a Catalog Role and Grant Privileges

Navigate to **Catalogs -> \[your catalog] -> Roles -> + Catalog Role** and create a role with the following privileges:

* `NAMESPACE_CREATE`
* `NAMESPACE_LIST`
* `NAMESPACE_READ_PROPERTIES`
* `NAMESPACE_WRITE_PROPERTIES`
* `TABLE_LIST`
* `TABLE_CREATE`
* `TABLE_WRITE_DATA`
* `TABLE_READ_DATA`
* `TABLE_READ_PROPERTIES`
* `TABLE_WRITE_PROPERTIES`

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-28.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=a3c700421003d63abdc2f868a61f0d94" alt="Create catalog role" width="1920" height="875" data-path="images/ursa-lakehouse/open-catalog-aws-28.webp" />

Click **Grant to Principals Role** and grant the catalog role to the principal role created in step 8.

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-29.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=e63817d50d6be9facc50b86d6cc7284a" alt="Grant to principal role" width="1920" height="480" data-path="images/ursa-lakehouse/open-catalog-aws-29.webp" />

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-30.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=5f93990ca2c2d971f2be6526b974c390" alt="Grant configuration" width="1920" height="552" data-path="images/ursa-lakehouse/open-catalog-aws-30.webp" />

<img src="https://mintcdn.com/streamnative/IhGBhfNZfZHreuAr/images/ursa-lakehouse/open-catalog-aws-31.webp?fit=max&auto=format&n=IhGBhfNZfZHreuAr&q=85&s=c7a352bd9b60571b46a712f3dcc9705e" alt="Role bindings" width="1920" height="212" data-path="images/ursa-lakehouse/open-catalog-aws-31.webp" />

For background on the relationship between catalogs, catalog roles, principal roles, and principals, see the [Polaris Quick Start](https://polaris.io/#section/Quick-Start/Defining-a-Catalog).

## Catalog Information Summary

When the steps above are complete, collect the following values for the StreamNative Ursa compaction service:

| Value                | Description                                                                                                                                                    |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `iceberg.uri`        | Polaris REST endpoint (e.g., `https://<account>.<region>.aws.snowflakecomputing.com/polaris/api/catalog`). The format follows the URL of your Polaris console. |
| `iceberg.warehouse`  | The Polaris catalog name created in step 6                                                                                                                     |
| `iceberg.credential` | `<client-id>:<client-secret>` from step 8                                                                                                                      |
| `iceberg.scope`      | `PRINCIPAL_ROLE:ALL`                                                                                                                                           |

## Table Maintenance

Snowflake Open Catalog (Polaris) and the Hadoop catalog do **not** run table maintenance on your behalf. Streaming writes from the StreamNative Ursa compaction service produce many small Parquet files and accumulate snapshot history over time, which degrades query performance and inflates storage costs. You are responsible for scheduling and running maintenance against every Iceberg table written by Ursa.

Run the maintenance operations below on a regular schedule. They are provided as [Apache Iceberg Spark stored procedures](https://iceberg.apache.org/docs/latest/spark-procedures/) and can be triggered from any Spark cluster (Databricks, AWS EMR, AWS Glue, GCP Dataproc, or self-managed Spark) that has the Iceberg Spark runtime, catalog credentials, and IAM access to the warehouse bucket.

**Maintenance operations**

| Operation             | Purpose                                                                                                                               | Suggested cadence                                                                         |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `rewrite_data_files`  | Compact small Parquet files into fewer, larger files. Reduces file-listing overhead and improves scan performance.                    | Hourly to daily, depending on ingestion rate                                              |
| `expire_snapshots`    | Drop snapshots older than the retention window so their data and manifest files can be cleaned up.                                    | Daily; retain at least 1–7 days so in-flight readers and time-travel queries keep working |
| `remove_orphan_files` | Delete files in the table location that are no longer referenced by any snapshot (typically left behind by failed or partial writes). | Weekly                                                                                    |
| `rewrite_manifests`   | Rewrite manifest files so they align with the current partition layout. Improves query planning time.                                 | Weekly, or after large schema or partition changes                                        |

**Example: run maintenance from Spark**

The following examples assume the catalog has been registered in Spark as `<catalog>`. Replace `<catalog>`, `<namespace>`, and `<table>` with your values.

```sql theme={null}
-- Compact small files. Iceberg targets files smaller than the default 512 MB.
CALL <catalog>.system.rewrite_data_files(table => '<namespace>.<table>');

-- Expire snapshots older than 3 days; keep the 5 most recent snapshots.
CALL <catalog>.system.expire_snapshots(
  table       => '<namespace>.<table>',
  older_than  => TIMESTAMP '2026-05-20 00:00:00',
  retain_last => 5
);

-- Remove orphan files older than 7 days.
CALL <catalog>.system.remove_orphan_files(
  table      => '<namespace>.<table>',
  older_than => TIMESTAMP '2026-05-20 00:00:00'
);

-- Rewrite manifests to match the current partition layout.
CALL <catalog>.system.rewrite_manifests(table => '<namespace>.<table>');
```

**Operational guidance**

* **Credentials.** The principal that runs maintenance must have catalog privileges to read and write the target table (for example, the same `TABLE_READ_DATA`, `TABLE_WRITE_DATA`, `TABLE_READ_PROPERTIES`, and `TABLE_WRITE_PROPERTIES` privileges configured for the Ursa compaction service) and IAM access to the warehouse bucket so it can read and rewrite the underlying data files. With the Hadoop catalog there is no catalog service to authenticate against — only the bucket IAM access is required.
* **Concurrency.** Iceberg uses optimistic concurrency control. If maintenance commits race with the Ursa compaction writer, one of them retries. Schedule heavy operations (`rewrite_data_files`, `rewrite_manifests`) during low-write windows when possible.
* **Retention vs. time travel.** `expire_snapshots` and `remove_orphan_files` permanently delete files. Choose a retention window that exceeds the longest expected read query and your time-travel SLA.
* **Schedule the workload.** Most teams orchestrate these procedures from Databricks Jobs, AWS EMR steps, Airflow, Dagster, or a Kubernetes `CronJob`. Pick a scheduler that fits your existing operational stack.
* **Reference.** See the [Iceberg Spark procedures](https://iceberg.apache.org/docs/latest/spark-procedures/#metadata-management) documentation for the full parameter list, including options for partial rewrites (`where`), file-size targets, and merge-on-read delete file compaction.

For the next steps, see [Register Lakehouse Catalogs](/cloud/lakehouse/catalogs/register-catalog).
