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
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:, and an IAM user maps to
role-nameIAM:. You reference these mapped names in
producer-side RMS grants. There is no database user to create.user-name
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-defaultworkgroup ARN. The required actions depend on the resource:-
On the
express-defaultworkgroup ARN,arn:aws:redshift-serverless:, grantregion:account:workgroup/express/express-defaultredshift-data:ExecuteStatementorredshift-data:BatchExecuteStatement, the metadata actionsredshift-data:ListDatabases,redshift-data:ListSchemas,redshift-data:ListTables, andredshift-data:DescribeTable, andredshift-serverless:GetCredentials. -
On
"*", grantredshift-data:DescribeStatementandredshift-data:GetStatementResult, because the Data API defines no resource types for them. You can limit them to the statement owner with theredshift-data:statement-owner-iam-useridcondition 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, andredshift-serverless:GetCredentialson theexpress-defaultworkgroup 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:GetCredentialsto get a short-lived database credential, andredshift-serverless:DbConnectto open the connection. WithoutDbConnect, the connection fails withAuthorization 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
with your AWS Region and
us-east-1 with your AWS account ID.123456789012
{ "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, andsys: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
.
The IAM-unique-ID@account-idquery_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:
(only region:account:workgroup/express/express-defaultexpress-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, andsys:superuserfor break-glass administrators. -
Keep
sys:secadminseparate fromsys:dba. -
Restrict who can call
CreateRoleAssociation, because a principal that can create associations can grant itselfsys:superuser. -
To allow association management but prevent granting full system permissions, deny
redshift-serverless:CreateRoleAssociationwith theredshift-serverless:roleTypecondition key set tosys:operator,sys:dba, andsys:superuser. -
To keep the configuration read-only while still allowing queries, deny
redshift-serverless:UpdateExpressConfiguration,redshift-serverless:CreateRoleAssociation, andredshift-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 |
|
| Amazon S3 Tables |
The same AWS Glue read permissions, plus
|
| 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
( |
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:
-
Querying Amazon S3 Tables in the Amazon Redshift Database Developer Guide.
-
Getting started with Amazon Redshift federated permissions 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 in the Amazon Redshift Database Developer Guide.