Learn Everything

Paths/DevOps Engineer/AWS / Identity & Access

Guided Taskbeginneraws-cli (lab profile)Ask AI

Verify Your AWS Identity

Before touching any AWS service, always confirm who the CLI is acting as. Misconfigured credentials are the #1 cause of 'why can't I access anything'.

Validator

⏱ 0:00

IDLE — checks run live as you type commands; submit when done

01Requirements

live checks
  • Directory ~/report exists○
  • File ~/report/account.txt exists and contains the AWS account ID○

02Walkthrough

4 steps
  1. 01

    Call STS

    aws sts get-caller-identity asks the Security Token Service who you are. It works with any valid credentials and costs nothing.

    aws sts get-caller-identity
  2. 02

    Read the response

    Three fields: UserId, Account (844399650771 in this lab) and the Arn — which also tells you whether you're a user, a role or a federated session.

  3. 03

    Record the account ID

    Write it into the report file.

    echo 'account: 844399650771' > ~/report/account.txt
  4. 04

    Verify and submit

    cat the file, then submit. The validator compares against the lab's real account ID.

    cat ~/report/account.txt

03Stuck?

0 of 3 revealed

Take a hint without losing the lab — each one points at the thing to look at, not at the answer.

04AI Tutor

guides, never solves

Tell me what you're stuck on — I'll nudge, not solve. Which requirement are you looking at?

04Notebook

saved locally in this browser

learner@lab — aws-cli (lab profile)

↑/↓ recalls commands · Ctrl+Enter submits · type help for the command list