curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o awscliv2.zip && unzip awscliv2.zip && sudo ./aws/install★AWS CLI v2 (current) — the bundled installer, not pip.pip install awscliinstalls the old v1, which enters maintenance mode 15 Jul 2026.brew install awscli★Installs v2 on macOS via Homebrew — keeps updates easy.aws --version·aws updateConfirm the version;aws update(v2.36+) self-updates to the latest.aws configure★Interactive wizard: sets Access Key, Secret, Region, and output format in~/.aws/credentials&~/.aws/config.aws configure --profile prod★Create a named profile — useful for multiple accounts or roles.aws configure listShow current active credentials & config source.aws configure list-profilesList all locally configured profiles.aws configure sso★Set up IAM Identity Center (SSO) — the modern, keyless auth. Creates an SSO-backed profile.aws sso login --profile prod★Open the browser to get short-lived SSO credentials for that profile — no long-lived keys on disk.
Credentials precedence: env vars → CLI flags → ~/.aws/credentials → IAM instance role. An instance role is the recommended production approach — no local keys needed.