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

# Connect to AWS Glue Catalog

> Connect AWS Glue as an Iceberg catalog in Wherobots from the Data Hub, then read and write Iceberg tables in Glue from your Wherobots Spark workloads.

Use the data in your AWS Glue Catalog in Wherobots. Connect it once from the Data Hub, then read and write tables in Glue from your Wherobots Spark workloads.

Wherobots connects to AWS Glue through a [**Cloud Connection**](#cloud-connections), which is a reusable IAM role that Wherobots assumes in your AWS account. The Data Hub wizard provisions everything with AWS CloudFormation, so there's no IAM policy or Spark configuration to write by hand.

## Before you start

The following requirements must be met within both your Wherobots Organization and AWS account before you can connect to a Glue catalog.

<AccordionGroup cols={2}>
  <Accordion title="Wherobots Requirements" icon="cloud">
    * An **Admin** account within a **Professional**, **Innovation**, or **Enterprise** Edition Organization to create catalogs and Cloud Connections.
          <Note>
            Wherobots Organization members with the **User** role can use existing catalogs and Cloud Connections set up by Admins but cannot create new ones. See [Organization Roles](/get-started/organization-info/organization-roles/).
          </Note>
    * Community Edition is not supported. See [Organization Editions](/get-started/organization-management/organization-editions) or [Upgrade Organization](/get-started/upgrade-organization/).
    * An existing **Cloud Connection** to your AWS account, or permission to create one. For more information, see [Cloud Connections](#cloud-connections).
    * Your **Organization ID**, found at [cloud.wherobots.com/organization](https://cloud.wherobots.com/organization).
  </Accordion>

  <Accordion title="AWS Requirements" icon="aws">
    * An **AWS account** with an existing **Glue database** and an **S3 bucket** that holds your Glue table data.
    * Permission to **create CloudFormation stacks that provision IAM resources** (typically `AdministratorAccess`), so Wherobots can set up the Cloud Connection and grant it Glue access. CloudFormation creates the IAM role and policies for you, so you don't edit them by hand.

          <Accordion title="What CloudFormation provisions" icon="shield-halved">
            The pre-filled templates create or modify IAM resources on your behalf. The actions they perform typically require `AdministratorAccess`:

            | IAM Action               | Description                                               |
            | ------------------------ | --------------------------------------------------------- |
            | `CreateRole`             | Creates the Cloud Connection IAM role                     |
            | `UpdateAssumeRolePolicy` | Sets the trust policy that lets Wherobots assume the role |
            | `PutRolePolicy`          | Attaches the inline policy granting Glue and S3 access    |
            | `AttachRolePolicy`       | Attaches a managed policy to the role                     |
            | `DeleteRolePolicy`       | Removes an inline policy (on stack update or delete)      |
            | `DetachRolePolicy`       | Detaches a managed policy (on stack update or delete)     |

            For a complete list of IAM Actions, see [Actions defined by AWS Identity and Access Management](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsidentityandaccessmanagementiam.html#awsidentityandaccessmanagementiam-actions-as-permissions) in the AWS Documentation.
          </Accordion>
  </Accordion>
</AccordionGroup>

### Cloud Connections

Before you can connect to an AWS Glue catalog, Wherobots needs a **Cloud Connection** to your AWS account.

<Accordion title="What is a Cloud Connection?" icon="cloud">
  A **Cloud Connection** is a single, reusable trust relationship between your Wherobots Organization and a cloud provider account. For AWS, it's a first-class object that stores your AWS **account ID** and an IAM **role** (with an **external ID**) that Wherobots assumes on your behalf to access resources in your account.

  <Note>
    Create **one** Cloud Connection per AWS account and reuse it across all of your **S3 storage integrations** and **AWS Glue catalogs** in that account, instead of configuring credentials separately for each one.
  </Note>

  **Trust is established with AWS CloudFormation.** Create the connection directly in the Wherobots UI, or download the CloudFormation template (YAML) so your security team can review it before deploying.

  ### Manage Cloud Connections

  Cloud Connections live in [**Organization Settings**](https://cloud.wherobots.com/organization#cloud-connections) under **Cloud Connections**, where Admins can create, list, verify, and delete them.

  * **Verify**: Confirms Wherobots can assume your IAM role through the two-hop AWS STS `AssumeRole` chain.
  * **Delete**: Blocked while any storage integration or Glue catalog is still bound to the connection. You must remove any resources bound to that Cloud Connection prior to its deletion.
</Accordion>

## Connect to the AWS Glue catalog

Connect your AWS Glue Catalog to your Wherobots Organization in order to read and write to it from your Wherobots workloads.

The Data Hub wizard provisions the connection with a CloudFormation stack, so you don't have to write IAM policies or Spark configs by hand.

<Steps>
  <Step title="Open the Add Amazon Glue Catalog wizard">
    In [Wherobots Cloud](https://cloud.wherobots.com/), open [**Data Hub**](https://cloud.wherobots.com/data-hub), click **Add Catalog**, and under **Foreign Catalog** choose **Amazon Glue Catalog**.

    <Frame caption="Data Hub → Add Catalog → Amazon Glue Catalog.">
      <img src="https://mintcdn.com/wherobots/KVV5aPi0BttvEVfX/develop/storage-management/storage-management-images/s3-cloud-connection/amazon-glue-foreign-catalog.png?fit=max&auto=format&n=KVV5aPi0BttvEVfX&q=85&s=8a3bfa4a8007536c20a35eccbb5bc8ab" alt="The Data Hub Add Catalog menu with Amazon Glue Catalog under Foreign Catalog" width="778" height="314" data-path="develop/storage-management/storage-management-images/s3-cloud-connection/amazon-glue-foreign-catalog.png" />
    </Frame>
  </Step>

  <Step title="Enter the catalog details">
    On the **Details** step, enter:

    * **Name:** The name of the catalog in Wherobots.
      * This affects the Fully Qualified Name (FQN) used to reference this catalog in Wherobots: `CATALOG_NAME.DATABASE_NAME.TABLE_NAME`
      * A name can contain any character. But if it includes anything other than letters, numbers, or underscores — such as a space, dash, or period — you must wrap the name in backticks wherever you reference it in the FQN. For example, a catalog named `My-Catalog` is referenced as `` `My-Catalog`.database.table ``.
          <Tip>
            For simplicity and to avoid quoting issues, it's recommended to use only alphanumeric characters, spaces, or underscores.
          </Tip>
    * **AWS Region:** The region your Glue catalog is in.
    * **S3 Path:** The bucket (and optional prefix) that holds your Glue table data.
    * **Access level:** The level of access Wherobots has to the catalog.
      * Choose **Read-only** to allow Wherobots to read tables in your Glue catalog, but not create or modify them.
      * Choose **Read-write** to allow Wherobots to read, create, and modify tables in your Glue catalog.
    * Click **Continue**.

    <Frame caption="Step 1, Details: name the catalog, then set the AWS region, S3 path, and access level.">
      <img src="https://mintcdn.com/wherobots/KVV5aPi0BttvEVfX/develop/storage-management/storage-management-images/s3-cloud-connection/add-amazon-glue-catalog.png?fit=max&auto=format&n=KVV5aPi0BttvEVfX&q=85&s=32c3f934db46e8a2751ee2e067763a1a" alt="The Details step of the Add Amazon Glue Catalog wizard" width="2026" height="1308" data-path="develop/storage-management/storage-management-images/s3-cloud-connection/add-amazon-glue-catalog.png" />
    </Frame>
  </Step>

  <Step title="Choose a Cloud Connection">
    On the **Connection** step, pick an existing [Cloud Connection](#cloud-connections) or create a new one, then click **Continue**.

    <Frame caption="Step 2, Connection: select the Cloud Connection Wherobots uses to reach Glue.">
      <img src="https://mintcdn.com/wherobots/KVV5aPi0BttvEVfX/get-started/get-started-images/glue-catalog/catalog-connection.png?fit=max&auto=format&n=KVV5aPi0BttvEVfX&q=85&s=281bc9ee378b042d56a5fd66ece91890" alt="The Connection step of the Add Amazon Glue Catalog wizard" width="1500" height="697" data-path="get-started/get-started-images/glue-catalog/catalog-connection.png" />
    </Frame>

    <Accordion title="Create a new Cloud Connection" icon="key" defaultOpen={true}>
      Creating a connection takes two steps inside the **Create Cloud Connection** dialog.

      <Steps>
        <Step title="Enter the connection details">
          * **Connection Name** — a label that identifies the trust relationship in Wherobots.
          * **AWS Account ID** — the 12-digit AWS account you're connecting to.

          Click **Create Connection**.

          <Frame caption="Connection details: name the connection and enter your AWS Account ID.">
            <img src="https://mintcdn.com/wherobots/KVV5aPi0BttvEVfX/develop/storage-management/storage-management-images/s3-cloud-connection/create-cloud-connection.png?fit=max&auto=format&n=KVV5aPi0BttvEVfX&q=85&s=1b2448ee60a8cb9ba39f79c42a5a9df7" alt="The Create Cloud Connection dialog" width="998" height="828" data-path="develop/storage-management/storage-management-images/s3-cloud-connection/create-cloud-connection.png" />
          </Frame>
        </Step>

        <Step title="Grant access in AWS">
          Wherobots generates a pre-filled CloudFormation stack (named `wherobots-connection-<name>`) that creates the connection's IAM role. Click **Open in AWS Console** to launch it in a new tab, or **Download Template** to run it yourself.

          <Frame caption="Grant access in AWS: launch the pre-filled CloudFormation stack that creates the Cloud Connection role.">
            <img src="https://mintcdn.com/wherobots/KVV5aPi0BttvEVfX/develop/storage-management/storage-management-images/s3-cloud-connection/create-cloud-connection-grant.png?fit=max&auto=format&n=KVV5aPi0BttvEVfX&q=85&s=e7d8a8e647de688cc4062ab6d191f1e8" alt="The Grant access in AWS step of the Create Cloud Connection dialog, with Open in AWS Console and Download Template buttons" width="1500" height="756" data-path="develop/storage-management/storage-management-images/s3-cloud-connection/create-cloud-connection-grant.png" />
          </Frame>

          On the AWS **Quick create stack** page, everything is pre-filled. Scroll to the bottom, select **I acknowledge that AWS CloudFormation might create IAM resources**, and click **Create stack**.

          <Frame caption="On the AWS Quick create stack page, acknowledge the IAM capability and click Create stack.">
            <img src="https://mintcdn.com/wherobots/KVV5aPi0BttvEVfX/develop/storage-management/storage-management-images/s3-cloud-connection/aws-quick-create-stack.png?fit=max&auto=format&n=KVV5aPi0BttvEVfX&q=85&s=9d5493ed4b25492989b50a0304419b09" alt="The Capabilities section of the AWS Quick create stack page with the IAM acknowledgment checkbox selected" width="1500" height="779" data-path="develop/storage-management/storage-management-images/s3-cloud-connection/aws-quick-create-stack.png" />
          </Frame>

          Back in Wherobots, click **Done** to finish creating the connection.
        </Step>
      </Steps>
    </Accordion>
  </Step>

  <Step title="Deploy the catalog stack">
    On the **Deploy** step, launch the pre-filled CloudFormation stack (named `wherobots-glue-readonly-<name>` or `wherobots-glue-readwrite-<name>`). It attaches Glue and S3 access to your Cloud Connection.

    1. Click **Open in AWS Console** (or **Download Template** to manually paste it into the AWS CloudFormation console).
    2. On the AWS **Quick create stack** page, select **I acknowledge that AWS CloudFormation might create IAM resources**, and click **Create stack**.
    3. Return to Wherobots and click **Create catalog**.

    <Frame caption="Step 3, Deploy: launch the CloudFormation stack, then create the catalog.">
      <img src="https://mintcdn.com/wherobots/KVV5aPi0BttvEVfX/get-started/get-started-images/glue-catalog/catalog-deploy.png?fit=max&auto=format&n=KVV5aPi0BttvEVfX&q=85&s=38803b636d6421560b25a79d93b49af1" alt="The Deploy step of the Add Amazon Glue Catalog wizard, with Open in AWS Console and Create catalog" width="1500" height="697" data-path="get-started/get-started-images/glue-catalog/catalog-deploy.png" />
    </Frame>
  </Step>

  <Step title="Verify and finish">
    After the stack completes, Wherobots verifies it can access your Glue catalog. Once verified, the catalog appears in the [**Data Hub**](https://cloud.wherobots.com/data-hub) and is ready to use.

    <Note>
      IAM changes can take a few minutes to propagate across AWS. If verification fails immediately, wait a moment and retry.
    </Note>
  </Step>
</Steps>

## Next Steps

After you connect your Glue catalog, you can query its tables from a Wherobots notebook. See [Query AWS Glue Catalog in a Notebook](/get-started/initial-storage/aws/query-glue-catalog-in-a-notebook) for guidance and starter code.

<Info>
  In Wherobots Cloud, you must start a **new** runtime after creating the catalog. Notebooks only see catalogs that existed when the runtime started.
</Info>

## Known Limitations

The following limitations apply to Glue catalogs connected to Wherobots:

* Glue REST API doesn't support staged creates, i.e. no `CREATE TABLE foo AS SELECT ...`
* Glue REST API doesn't support reading or writing views
* Glue REST API doesn't support `ALTER TABLE … RENAME TO`
* Iceberg V3 Tables can be read, but ONLY if they don't have any of the new column types (`geometry` / `geography`, `variant`, `timestamp_ns`)
