This guide walks you through installing and configuring the AWS Command Line Interface (CLI) on macOS, Linux, and Windows.
Prerequisites
- An AWS account
- IAM user with programmatic access
- Access key ID and secret access key
Installation
macOS (Homebrew)
brew install awscliLinux
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/installWindows
Download and run the MSI installer from the AWS website, or use winget:
winget install Amazon.AWSCLIConfiguration
Run the configure command and enter your credentials:
aws configure
# You'll be prompted for:
# AWS Access Key ID: AKIA...
# AWS Secret Access Key: ****
# Default region name: us-east-1
# Default output format: jsonVerify Installation
Test your configuration by listing your S3 buckets:
aws --version
aws sts get-caller-identity
aws s3 lsPro Tip: Multiple Profiles
Use named profiles for different AWS accounts:
aws configure --profile work
aws s3 ls --profile work