View a markdown version of this page

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

CURRENT_AWS_ACCOUNT

Returns the AWS account associated with the Amazon Redshift cluster that submitted a query.

Syntax

current_aws_account

Return type

Returns an integer.

Example

The following query returns the name of the current database.

select user, current_aws_account; current_user | current_account -------------+--------------- dwuser | 987654321 (1 row)