Let me tell you what AWS STS GetCallerIdentity does.
-
First, it retrieves information about the IAM identity making the request.
-
Next, it shows the AWS account ID associated with that request.
-
Then, you get the unique user ID for the IAM user or role.
-
After that, it provides the ARN, which is the Amazon Resource Name of the caller.
Finally, it’s really useful for security audits, helping you verify who has access to your AWS services.