CURRENT_AWS_ACCOUNT - Amazon Redshift
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

CURRENT_AWS_ACCOUNT

Returns the Amazon 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)