A config section without the prefix
Reported as a profile that does not exist
[dev] region = eu-west-1 output = json
Read a CLI profile file for the reasons a profile is not found or points at the wrong account. Secret values are never shown or exported.
Or drop a file anywhere on this panel. Nothing is uploaded: the analysis runs in this tab.
The answer appears here
Paste on the left and press Analyze. Nothing leaves this tab.
Nothing else to flag.
No formatting problems, and nothing the rules object to. Worth remembering what that covers: this reads the file you pasted, not the account or cluster it will be applied to.
No finding matches that filter.
Real input you can load into the tool above. Each one shows a different thing going wrong, because that is what the tool is for.
Reported as a profile that does not exist
[dev] region = eu-west-1 output = json
No credential to sign the AssumeRole call with
[profile dev] region = eu-west-1 role_arn = arn:aws:iam::111122223333:role/Deployer
Never expires, in a plain text file every backup tool copies
[default] aws_access_key_id = AKIAIOSFODNN7EXAMPLE aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
These are the ones that fail silently. The config is accepted, nothing raises an error, and the consequence arrives later.
The prefix rule is opposite between them, so the section is either invisible or looked up under a name including the word profile.
Instead:Use [profile name] in config and [name] in credentials.
AWS_PROFILE and AWS_ACCESS_KEY_ID in the environment override the files entirely and nothing reports it.
Instead:Run env | grep AWS_ and aws sts get-caller-identity before changing anything in the files.
Assuming a role needs a starting credential to sign the call with, and there is nothing to use.
Instead:Add source_profile, or credential_source on an instance.
Every section in ~/.aws/config except [default] needs [profile name]. Every section in ~/.aws/credentials needs the bare [name]. Get it the wrong way round and the CLI reports the profile as not found.
It suggests the profile does not exist rather than that its header is written for the other file, and the two files sit next to each other with the same syntax.
The CLI checks command line options, then the environment, then these files. A stale AWS_ACCESS_KEY_ID exported in a shell profile years ago overrides every profile here and points every command at the wrong account, with no warning.
It says which principal is actually in use, which is the only reliable way to find out. env | grep AWS_ says why.
Either source_profile, naming another profile, or credential_source, naming the environment or an instance role. Setting both is an error rather than a preference, because they answer the same question.
Without one, the CLI falls back to AWS_REGION, then AWS_DEFAULT_REGION, then errors. A command that works in one shell and not another is usually this and nothing else.
Backup tools, editors, container mounts and screen shares all copy it, and an AKIA key never expires. aws sso login or a role profile writes nothing permanent to disk.