View a markdown version of this page

Data access and permissions - Amazon Redshift

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 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.

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.

  • 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.

  • 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.

{ "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 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, or data sharing writes 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, 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:

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: