> For the complete documentation index, see [llms.txt](https://upsolver.gitbook.io/content/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://upsolver.gitbook.io/content/reference-1/sql-commands/connections/create-connection/aws-glue-data-catalog.md).

# AWS Glue Data Catalog

In order to create and work with data lake tables and Apache Iceberg tables within Upsolver, you first need to establish a connection with a metadata store such as AWS Glue Data Catalog.

The tables created from your AWS Glue Data Catalog connection can also be queried from Athena and from within the Upsolver UI.

{% hint style="info" %}
Note that when you integrate Upsolver with your AWS account, there is a Glue Data Catalog connection created by default, but you may still wish to create your own connection for specific access configurations.

See the how-to guide to [Deploy Upsolver on AWS](/content/how-to-guides-1/setup/deploy-upsolver-on-aws.md).
{% endhint %}

## Syntax

```sql
CREATE GLUE_CATALOG CONNECTION <connection_identifier> 
 [ { AWS_ROLE = '<role_arn>' 
    EXTERNAL_ID = '<external_id>'
  | AWS_ACCESS_KEY_ID = '<key_id>' 
    AWS_SECRET_ACCESS_KEY = '<key>' } ]
 DEFAULT_STORAGE_CONNECTION = <identifier>
 DEFAULT_STORAGE_LOCATION = 's3://<bucket>/<folder-path>/'
 [ REGION = '<region>' ]  
 [ DATABASE_DISPLAY_FILTER[S] = { '<database_name>' | ('<database_name>' [, ...]) } ]
 [ COMMENT = '<comment>' ] 
```

#### Jump to

* [`AWS_ROLE`](#aws_role-editable)
* [`EXTERNAL_ID`](#external_id-editable)
* [`AWS_ACCESS_KEY_ID`](#aws_access_key_id-editable)
* [`AWS_SECRET_ACCESS_KEY`](#aws_secret_access_key-editable)
* [`DEFAULT_STORAGE_CONNECTION`](#default_storage_connection)
* [`DEFAULT_STORAGE_LOCATION`](#default_storage_location)
* [`DATABASE_DISPLAY_FILTER[S]`](#database_display_filter-s-editable)
* [`COMMENT`](#comment-editable)

## Connection options

#### `AWS_ROLE` — editable

Type: `text`

(Optional) The AWS IAM role ARN. Used in conjunction with [`EXTERNAL_ID`](#external_id-editable).

If omitted, the role created when integrating Upsolver with the AWS account is used.

#### `EXTERNAL_ID` — editable

Type: `text`

(Optional) The external ID of the role to assume. Used in conjunction with [`AWS_ROLE`](#aws_role-editable).

If omitted, the role created when integrating Upsolver with the AWS account is used.

#### `AWS_ACCESS_KEY_ID` — editable

Type: `text`

(Optional) The AWS access key ID. Used in conjunction with [`AWS_SECRET_ACCESS_KEY`](#aws_secret_access_key).

If omitted, the role created when integrating Upsolver with the AWS account is used.

#### `AWS_SECRET_ACCESS_KEY` — editable

Type: `text`

(Optional) The AWS secret key corresponding to the provided [`AWS_ACCESS_KEY_ID`](#aws_access_key_id).

If omitted, the role created when integrating Upsolver with the AWS account is used.

#### `DEFAULT_STORAGE_CONNECTION`

Type: `identifier`

An Amazon S3 connection with the appropriate credentials to write to the [`DEFAULT_STORAGE_LOCATION`](#default_storage_location) provided.

#### `DEFAULT_STORAGE_LOCATION`

Type: `text`

The Amazon S3 path that serves as the default storage location for the underlying files associated with tables created under this metastore connection.

#### `REGION`

Type: `text`

Default: Region in which Upsolver is deployed within your AWS account

(Optional) The region your Glue Catalog is in.

#### `DATABASE_DISPLAY_FILTER[S]` — editable

Type: `text | list`

(Optional) A single database or the list of databases to show. If left empty, all databases are visible.

#### `COMMENT` — editable

Type: `text`

(Optional) A description or comment regarding this connection.

## Minimum example

```sql
CREATE GLUE_CATALOG CONNECTION my_glue_catalog_connection
    DEFAULT_STORAGE_CONNECTION = my_s3_storage_connection
    DEFAULT_STORAGE_LOCATION = 's3://sqlake/my_glue_catalog_table_files/';
```

{% hint style="info" %}
This example uses the default credentials from Upsolver's integration with AWS.
{% endhint %}

See the how-to guide to [Deploy Upsolver on AWS](/content/how-to-guides-1/setup/deploy-upsolver-on-aws.md).

Additionally, this example assumes that you have created the Amazon S3 connection `my_s3_storage_connection` with proper write permissions to the specified storage location.

Refer to [Amazon S3](/content/reference-1/sql-commands/connections/create-connection/amazon-s3.md) for more information on creating a connection using SQL.

## Full example

```sql
CREATE GLUE_CATALOG CONNECTION my_glue_catalog_connection
    AWS_ROLE = 'arn:aws:iam::123456789012:role/upsolver-sqlake-role'
    DEFAULT_STORAGE_CONNECTION = my_s3_storage_connection
    DEFAULT_STORAGE_LOCATION = 's3://sqlake/my_glue_catalog_table_files/'
    REGION = 'us-east-1'
    DATABASE_DISPLAY_FILTERS = ('demo_db', 'prod_db')
    COMMENT = 'glue catalog connection example';
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://upsolver.gitbook.io/content/reference-1/sql-commands/connections/create-connection/aws-glue-data-catalog.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
