

 Amazon Redshift will no longer support the use of Python UDFs after June 30, 2026. We will start enforcing it in phases. For more information on the details of Python end of life and migration options, see the [ blog post ](https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/) that was published on June 30, 2025. 

# Data access and permissions

Amazon Redshift Serverless with express configuration uses four kinds of permissions:
+ Permission to use the express configuration
+ Permission to connect to it
+ Permission to monitor and administer the express configuration, granted through role associations
+ Permission on the data that you query

**Permission to use the express configuration**

You activate the express configuration one time per account and AWS Region. For more information, see [Activating the express configuration](serverless-express-activating.md).

**Authentication**

The express configuration authenticates every request with IAM, rather than with a native Amazon Redshift database user name and password. Federated sign-in works whenever it resolves to an IAM role:
+ SAML federation works when your identity provider issues an assertion that lets you assume an IAM role.
+ OIDC works through `AssumeRoleWithWebIdentity`.

Federated sign-in must resolve to an IAM role, so use a flow that assumes an IAM role rather than an OAuth flow that terminates in IAM Identity Center.

When an IAM identity connects, it maps one-to-one to a database user. An IAM role maps to `IAMR:{{role-name}}`, and an IAM user maps to `IAM:{{user-name}}`. You reference these mapped names in producer-side RMS grants. There is no database user to create.

The express configuration doesn't support session tags such as `RedshiftDbUser`, so the database user always comes from the IAM identity.

**Permission to connect**

IAM also controls who can call the express configuration, and the exact actions depend on how you connect:
+ **Amazon Redshift Data API (the AWS CLI, SDKs, and Amazon SageMaker Unified Studio)** – if a request doesn't pass a workgroup, the Data API authorizes these actions against the `express-default` workgroup ARN. The required actions depend on the resource:
  + On the `express-default` workgroup ARN, `arn:aws:redshift-serverless:{{region}}:{{account}}:workgroup/express/express-default`, grant `redshift-data:ExecuteStatement` or `redshift-data:BatchExecuteStatement`, the metadata actions `redshift-data:ListDatabases`, `redshift-data:ListSchemas`, `redshift-data:ListTables`, and `redshift-data:DescribeTable`, and `redshift-serverless:GetCredentials`.
  + On `"*"`, grant `redshift-data:DescribeStatement` and `redshift-data:GetStatementResult`, because the Data API defines no resource types for them. You can limit them to the statement owner with the `redshift-data:statement-owner-iam-userid` condition key. For more information, see [Configure an IAM policy that restricts access to SQL statement information to only the statement owner](data-api-iam.md#data-api-restrict-to-statement-owner).
+ **query editor v2** – a query editor v2 managed policy such as `AmazonRedshiftQueryEditorV2NoSharing`, and `redshift-serverless:GetCredentials` on the `express-default` workgroup ARN. For more information about the managed policies, see [Accessing the query editor v2](query-editor-v2-getting-started.md#query-editor-v2-configure).
+ **JDBC, ODBC, psql, and other PostgreSQL clients (public endpoint or AWS PrivateLink)** – `redshift-serverless:GetCredentials` to get a short-lived database credential, and `redshift-serverless:DbConnect` to open the connection. Without `DbConnect`, the connection fails with `Authorization failed: your IAM identity does not have permission to connect to Redshift Serverless with express configuration`.

The following example IAM policy for the PostgreSQL endpoint allows `redshift-serverless:GetCredentials` and `redshift-serverless:DbConnect`. In the policy, replace `{{us-east-1}}` with your AWS Region and `{{123456789012}}` with your AWS account ID.

```json
{
  "Version": "2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Action": ["redshift-serverless:GetCredentials", "redshift-serverless:DbConnect"],
      "Resource": "arn:aws:redshift-serverless:{{us-east-1}}:{{123456789012}}:workgroup/express/express-default"
    }
  ]
}
```

Scope the policy to the workgroup ARN shown. A policy scoped to `cluster:*` doesn't cover the express configuration.

Amazon Redshift Serverless records each connection attempt through the regional endpoint to the express configuration as a `DbConnect` event in AWS CloudTrail. `DbConnect` is a data event. CloudTrail doesn't log data events by default, and they don't appear in CloudTrail Event history. To record `DbConnect` events, create a trail or a CloudTrail Lake event data store with an advanced event selector for the resource type `AWS::RedshiftServerless::ExpressConfiguration`. Data events incur additional CloudTrail charges. For more information, see [Logging data events](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html) in the *AWS CloudTrail User Guide*.

**Role associations**

When an IAM identity connects, the express configuration maps it to a database user, as described under **Authentication**. A role association gives that database user an Amazon Redshift system-defined role for monitoring, operational, or administrative tasks on the express configuration. You can associate an IAM role or IAM user in the same AWS account.

A role association doesn't give access to your data, whatever the role. Access to data comes only from the permissions described in **Permission on the data**. For example, access to Redshift Managed Storage (RMS) tables comes from producer-side Amazon Redshift federated-permission grants to the mapped identity.

A role association takes effect when the principal connects, and the session keeps the role until it disconnects. You can associate up to 10 principals with each role type.

The following system-defined roles apply only within the express configuration. None of them gives access to your data.
+ `sys:monitor` – Read access to system tables and views, for dashboards and observability.
+ `sys:operator`, `sys:dba`, and `sys:superuser` – All system permissions. On the express configuration, these three roles give the same permissions, because there are no persistent objects to administer.
+ `sys:secadmin` – Creates, alters, and drops users and roles, grants roles, and manages row-level security and dynamic data masking. It doesn't give access to your data.

The express configuration has no persistent storage, so no role can create persistent schemas, tables, or views. Use temporary tables, [Iceberg writes](https://docs.aws.amazon.com/redshift/latest/dg/iceberg-writes.html), or [data sharing writes](https://docs.aws.amazon.com/redshift/latest/dg/getting-started-datashare-writes.html) instead.

To monitor activity on the express configuration, use the SYS monitoring views. Identify each query by its `query_uuid` column and each user by its `external_user_id` column, which has the form `{{IAM-unique-ID}}@{{account-id}}`. The `query_id` and `user_id` columns show `-1` on the express configuration. To read [SYS\_CONNECTION\_LOG](https://docs.aws.amazon.com/redshift/latest/dg/SYS_CONNECTION_LOG.html), the principal needs a role association for `sys:operator`, `sys:dba`, or `sys:superuser`.

Role type names are case-sensitive. You manage associations with the following API operations and their equivalent AWS CLI commands:
+ `CreateRoleAssociation`/`create-role-association`
+ `ListRoleAssociations`/`list-role-associations`
+ `DeleteRoleAssociation`/`delete-role-association`

Each call takes the target ARN `arn:aws:redshift-serverless:{{region}}:{{account}}:workgroup/express/express-default` (only `express-default` is supported), a role type, and the ARN of the IAM role or IAM user to associate, which must be in the same AWS account.

Follow these practices for role associations:
+ Grant the least-privileged role that does the job.
+ Reserve `sys:operator`, `sys:dba`, and `sys:superuser` for break-glass administrators.
+ Keep `sys:secadmin` separate from `sys:dba`.
+ Restrict who can call `CreateRoleAssociation`, because a principal that can create associations can grant itself `sys:superuser`.
+ To allow association management but prevent granting full system permissions, deny `redshift-serverless:CreateRoleAssociation` with the `redshift-serverless:roleType` condition key set to `sys:operator`, `sys:dba`, and `sys:superuser`.
+ To keep the configuration read-only while still allowing queries, deny `redshift-serverless:UpdateExpressConfiguration`, `redshift-serverless:CreateRoleAssociation`, and `redshift-serverless:DeleteRoleAssociation`.

**Permission on the data**

IAM governs who can call the express configuration. Authorization on the data then follows the model that applies to each data source, as described in the following table.


| Data source | Permissions you need | 
| --- | --- | 
| Amazon S3 data registered in a AWS Glue database | `glue:GetDatabases`, `glue:GetTables`, and `glue:GetTable`, plus the Amazon S3 read permissions `s3:GetObject` and `s3:ListBucket`. If the Amazon S3 location is registered with AWS Lake Formation, you need `lakeformation:GetDataAccess` instead of the Amazon S3 permissions, along with Lake Formation `DESCRIBE` and `SELECT` on the database and table. | 
| Amazon S3 Tables | The same AWS Glue read permissions, plus `lakeformation:GetDataAccess`. No Amazon S3 permissions are required. | 
| Redshift Managed Storage (RMS) | The same AWS Glue read permissions. Amazon Redshift federated permissions on the warehouse that owns the data control access to the RMS tables. The connecting identity maps to a provider-prefixed database user (`IAMR:{{role-name}}` or `IAM:{{user-name}}`), and you grant to that name on the producer. | 

The following example grants access on the producer to a mapped IAM role, using the federated-permissions catalog naming:

```sql
GRANT SELECT ON "sales_db@finance-catalog".sales_schema.sales_table TO "IAMR:sales_analyst";
```

For more information about the data sources and the federated-permissions model, see the following topics:
+ [Querying the AWS Glue Data Catalog](query-editor-v2-glue.md)
+ [Querying Amazon S3 Tables](https://docs.aws.amazon.com/redshift/latest/dg/querying-s3Tables.html) in the *Amazon Redshift Database Developer Guide*.
+ [Getting started with Amazon Redshift federated permissions](https://docs.aws.amazon.com/redshift/latest/dg/federated-permissions-onboarding.html) in the *Amazon Redshift Database Developer Guide*. To register RMS data, you choose one of two methods at registration time. The Amazon Redshift multi-warehouse method is the default and the one the AWS CLI uses. It requires the producer cluster to be on patch 206 or later. The AWS Glue Data Catalog method is available in the Amazon Redshift console and needs additional AWS Glue and AWS Lake Formation setup.
+ [Managing access control on the Amazon Redshift federated permissions catalog](https://docs.aws.amazon.com/redshift/latest/dg/federated-permissions-managing-access.html) in the *Amazon Redshift Database Developer Guide*.