Ad space (banner)
AD

Got the fundamentals? A structured AWS course is a fast way to level up.

Find AWS courses on Udemy

Affiliate link. Costs you nothing extra.

☁️AWS Lessons
Lesson 5 / 41

Confirming Who You Are with aws sts get-caller-identity

When you want to be certain which identity your commands run as, use aws sts get-caller-identity. It reports the account and user or role currently in effect.

The syntax is aws sts get-caller-identity.

Running it returns JSON containing your UserId, Account number and Arn — so you can see exactly which account and identity you are operating with.

A common stumble is running a destructive command against the wrong account. When you manage several accounts, checking first is a cheap safeguard.

In real work, it is the standard sanity check before touching production, and the quickest way to diagnose permission errors.

AWS
Try it (type this into the pseudo terminal)
aws sts get-caller-identity

🧑‍💻 You can type this command into the AWS pseudo terminal to try it yourself (this page itself has no interactive terminal).

Ad space (banner)
Ad space (in-article)