Cloud and security

Install the AWS CLI and sign in

The aws command, set up with your access keys or AWS SSO.

  1. Install the AWS CLI
    Terminal
    brew install awscli
  2. Sign in
    Terminal
    aws configure

    Paste an access key ID and secret from the AWS console (IAM). Using AWS SSO at work? Run aws configure sso instead.

Check it worked

  1. Check who you're signed in as
    Terminal
    aws sts get-caller-identity
Undo it
  1. Uninstall and remove saved keys
    Terminal
    brew uninstall awscli && rm -rf ~/.aws
  1. Install the AWS CLINeeds sudo
    Terminal · Ubuntu / Debian
    curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o awscliv2.zip
    unzip awscliv2.zip
    sudo ./aws/install

    On an ARM machine, change x86_64 to aarch64.

  2. Sign in
    Terminal · Ubuntu / Debian
    aws configure

    Paste an access key ID and secret from the AWS console (IAM). Using AWS SSO at work? Run aws configure sso instead.

Check it worked

  1. Check who you're signed in as
    Terminal · Ubuntu / Debian
    aws sts get-caller-identity
Undo it
  1. Uninstall and remove saved keysNeeds sudo
    Terminal · Ubuntu / Debian
    sudo rm -rf /usr/local/aws-cli /usr/local/bin/aws /usr/local/bin/aws_completer ~/.aws
  1. Install the AWS CLI
    PowerShell
    winget install Amazon.AWSCLI

    Close and reopen PowerShell afterwards.

  2. Sign in
    PowerShell
    aws configure

    Paste an access key ID and secret from the AWS console (IAM). Using AWS SSO at work? Run aws configure sso instead.

Check it worked

  1. Check who you're signed in as
    PowerShell
    aws sts get-caller-identity
Undo it
  1. Uninstall and remove saved keys
    PowerShell
    winget uninstall Amazon.AWSCLI; Remove-Item -Recurse "$env:USERPROFILE\.aws"