AWS CLI Installation
Install and configure the AWS Command Line Interface
💵 Cost: The AWS CLI tool is FREE to install and use. You only pay for the AWS services you interact with.
What is the AWS CLI?
The AWS Command Line Interface (CLI) is a tool that lets you control AWS services from your terminal. Instead of clicking around in the web console, you can run commands like aws s3 ls to list your S3 buckets.
Installation
On Mac, the easiest way is using Homebrew. If you dont have Homebrew, install it first from brew.sh.
For Apple Silicon Macs (M1/M2/M3/M4), also install Rosetta 2 for compatibility:
Verify Installation
aws-cli/2.15.0 Python/3.11.6 Darwin/23.0.0 exe/x86_64 prompt/off
Configure Your Credentials
Now connect the CLI to your AWS account using the access keys you created earlier:
Youll be prompted to enter four pieces of information:
AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE
AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Default region name [None]: ap-southeast-1
Default output format [None]: jsonChoosing a Region
We recommend ap-southeast-1 (Singapore) for users in Asia-Pacific. Other popular regions:
us-east-1- N. Virginia (most services available)us-west-2- Oregoneu-west-1- Ireland
Test Your Configuration
Verify everything works by listing your S3 buckets:
{
"UserId": "AIDAEXAMPLEUSERID",
"Account": "123456789012",
"Arn": "arn:aws:iam::123456789012:user/dev-user-fargate"
}Success!
Where Are Credentials Stored?
The CLI stores your credentials in:
- Mac/Linux:
~/.aws/credentials - Windows:
C:\Users\USERNAME\.aws\credentials
You can have multiple profiles for different AWS accounts. The default profile is used when you dont specify one.