CURRENT_SESSION_ARN
Returns the ARN of the currently authorized global user. Global users present with the same identity across Redshift accounts, clusters, and Serverless workgroups. Global users log in through IAM Identity Center, or through IAM-based session authentication. Data lake users are global Amazon users.
This function is typically used in the context of using multi-dialect Amazon Glue views. For more information about identity management with IAM Identity Center and Redshift, see Connect Redshift with IAM Identity Center to give users a single sign-on experience. For more information about multi-dialect Glue views Creating views in the Amazon Glue Data Catalog.
Syntax
current_session_arn()
Return type
Returns a VARCHAR string of the globally authenticated user or a null value.
Usage notes
Local users aren't supported and result in a null response.
Example
The following query returns the name of the current session ARN:
SELECT current_session_arn(); current_session_arn -------------- arn:aws:iam::123456789012:user/user (1 row)