GetCallerIdentity
Returns details about the IAM identity used to authenticate the request, including the AWS account ID, user/role ID, and ARN.
Stored Procedure-Specific Information
This procedure calls AWS Security Token Service (STS) and returns details about the identity whose credentials are used to make the request: the AWS account, the user ID, and the Amazon Resource Name (ARN). Use it to confirm which identity the connection is authenticating as. If you do not supply AWSAccessKey, AWSSecretKey, AWSRegion, or AWSSessionToken, the procedure uses the values from the connection.The following example returns the caller identity for the current connection:
EXECUTE GetCallerIdentity
Input
| Name | Type | Required | Description |
| AWSAccessKey | String | False | The AWS access key used for authentication. Optional if already included in the connection string. |
| AWSSecretKey | String | False | The AWS secret key paired with the access key. If the AWS secret key is already included in the connection string, this is optional. |
| AWSSessionToken | String | False | The temporary session token for AWS authentication. If not provided, it is retrieved from the connection. |
| AWSRegion | String | False | The AWS region to send the request to. If the AWS region is already included in the connection string, this is optional. |
Result Set Columns
| Name | Type | Description |
| Account | String | The AWS account ID number of the account that owns or contains the calling entity. |
| UserId | String | The unique identifier of the calling entity. |
| Arn | String | The AWS ARN associated with the calling entity. |