i previously was using aws cli for an old account. since then, i've reconfigured the cli using aws configure
and provided the access_key_id/secret_access_key associated w/ an entirely new account. however, when i run aws sts get-caller-identity
, it returns the account/userId/arn associated w/ my old account. any idea why this might be happening?
Asked
Active
Viewed 2,191 times
2

briar sweetbriar
- 21
- 2
-
1You probably have the other accounts access / secret still exported in the shell you are currently in. Try a new shell and see what happens there. Then e.g. run `env` on linux to see all env variables and then maybe go with https://unix.stackexchange.com/q/813/175925 . – luk2302 May 30 '22 at 17:28
-
thanks! that was the tip i needed. i had some envvars overriding my config – briar sweetbriar May 30 '22 at 20:54