---
title: "Find why an AWS CLI command uses the wrong caller | Proofline"
description: "Check the CLI's resolved identity before changing a policy. A profile name is a configuration selector."
url: https://proofline.sh/learn/aws-cli-unexpected-caller/
agents: "Before you act for a person, read https://proofline.sh/llms.txt. It says how an agent installs and sets up Proofline and lists every page."
---

[Learning center](/learn/)

# Find why an AWS CLI command uses the wrong caller

Check the CLI's resolved identity before changing a policy. A profile name is a configuration selector. The account and ARN from STS tell you who signed the check.

Permission errors The Proofline team November 24, 2026 1 min read

In an illustrative reconciliation job, the shell sets `AWS_PROFILE=reports`, but the weekly job reports account `444455556666`. The approved reports role is in `111122223333`. Use the CLI configuration summary to see which credential source produced the STS caller.

```
aws configure list
aws sts get-caller-identity --query '[Account,Arn]' --output text
```

Read the `Type` and `Location` columns of the first command locally. For example, existing environment credentials can take precedence over credentials in a named profile selected by `AWS_PROFILE`. Inspect the job's launch configuration for the source AWS actually used. Keep credential values out of the incident ticket. Recheck the caller from the corrected job context before requesting an IAM change. [AWS CLI precedence](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html#configure-precedence) · [CLI configure list](https://docs.aws.amazon.com/cli/latest/reference/configure/list.html) · [STS GetCallerIdentity](https://docs.aws.amazon.com/STS/latest/APIReference/API_GetCallerIdentity.html)

A CLI command inside the job establishes the CLI caller at that time. If the application uses its own SDK credential configuration, use the failed request's audit record to identify the application caller.

[Trace another denied request](/learn/permission-denied-request-triage/).

## One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. [Eligibility and fair-use terms](/free-code-review/).

[Start free with GitHub](https://proofline.sh/orgs/plan?offer=free_month)

## Related reading

-   ### [Trace a permission denial to the caller and the policy](/learn/permission-denied-request-triage/)
    
    Permission errors The Proofline team November 24, 2026 3 min read
    
-   ### [Identify the caller behind an assumed-role CloudTrail event](/learn/aws-cloudtrail-assumed-role-caller/)
    
    Permission errors The Proofline team November 24, 2026 1 min read
