Belajar Sendiri

Commands

aws login

aws login [--profile <name>]

Risk: Safe

What it does

Uses your console sign-in to give the CLI short-lived keys (AWS CLI 2.32.0 or newer).

When to use it

When you sign in as an IAM user, not through Identity Center. No access keys needed.

Example

$ aws login

Sign in through the browser; the CLI keeps the badges fresh.

$ aws login --profile my-dev-profile

Sign in to one named profile.

$ aws logout

End the session.