If you need to manage AWS services from your Windows command line, you need the AWS CLI. This guide walks you through the full installation, setup, and verification process step by step.
What Is AWS CLI and Why You Need It
AWS CLI (Command Line Interface) is a tool that lets you control AWS services directly from your terminal. Instead of clicking through the AWS console, you type commands. This saves time, enables automation, and is essential for DevOps workflows.
Version 2 is the current version. It has better performance, built-in auto-completion, and improved support for newer AWS services. Always install version 2 unless a specific project requires version 1.
Prerequisites Before You Install
Make sure you have these ready:
- A Windows 10 or Windows 11 machine (64-bit)
- Administrator access on your computer
- An AWS account with an IAM user that has programmatic access
- Your Access Key ID and Secret Access Key from AWS IAM
You do not need Python installed. AWS CLI v2 bundles its own Python runtime.
How to Install AWS CLI on Windows
There are two methods. The MSI installer is the easiest and recommended for most users.

Method 1: Install Using the MSI Installer (Recommended)
Step 1: Download the installer
Go to the official AWS documentation page and download the Windows MSI installer:
Download AWS CLI v2 for Windows
The direct download link for the 64-bit installer is:
https://awscli.amazonaws.com/AWSCLIV2.msi
Step 2: Run the MSI file
- Open your Downloads folder
- Double-click
AWSCLIV2.msi - Click Next on the welcome screen
- Accept the license agreement
- Choose the installation folder (default is fine:
C:\Program Files\Amazon\AWSCLIV2) - Click Install
- If Windows asks for administrator permission, click Yes
- Click Finish when done
Step 3: Verify the installation
Open Command Prompt or PowerShell and type:
aws --version
You should see something like:
aws-cli/2.22.0 Python/3.12.6 Windows/11 exe/AMD64
If you see this, AWS CLI is installed correctly.
Method 2: Install Using the Command Line (Silent Install)
This method is useful for scripted deployments or when setting up multiple machines.
Open PowerShell as Administrator and run:
msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi /quiet
This downloads and installs silently with no prompts. After it finishes, verify with:
aws --version
Method 3: Install Using winget (Windows Package Manager)
If you have winget installed (available on Windows 10 1809 and later), run this in PowerShell:
winget install Amazon.AWSCLI
Winget handles the download and installation automatically. Verify with aws --version afterward.
Configure AWS CLI After Installation
Installing the CLI is only half the job. You need to connect it to your AWS account.
Step 1: Run the Configure Command
Open Command Prompt or PowerShell and type:
aws configure
You will be prompted to enter four things:
AWS Access Key ID [None]: YOUR_ACCESS_KEY_ID
AWS Secret Access Key [None]: YOUR_SECRET_ACCESS_KEY
Default region name [None]: us-east-1
Default output format [None]: json
What to Enter for Each Field
| Field | What to Enter | Example |
|---|---|---|
| AWS Access Key ID | Your IAM access key | AKIAIOSFODNN7EXAMPLE |
| AWS Secret Access Key | Your IAM secret key | wJalrXUtnFEMI/K7MDENG |
| Default region name | Your closest AWS region | us-east-1 |
| Default output format | How results display | json |
Common region codes:
| Region | Code |
|---|---|
| US East (N. Virginia) | us-east-1 |
| US West (Oregon) | us-west-2 |
| Europe (Ireland) | eu-west-1 |
| Asia Pacific (Mumbai) | ap-south-1 |
Step 2: Test Your Configuration
Run a simple command to confirm your credentials work:
aws s3 ls
If you have S3 buckets, they will appear. If your account is new and empty, you will get a blank response but no error. Both mean it is working.
If you get an error like Invalid AWS Access Key Id, double-check your credentials in the AWS IAM console.
Where AWS CLI Stores Configuration Files
After running aws configure, two files are created on your machine:
| File | Location | Purpose |
|---|---|---|
| credentials | C:\Users\YourName\.aws\credentials | Stores your access keys |
| config | C:\Users\YourName\.aws\config | Stores region and output format |
You can open and edit these files in Notepad if you ever need to update them manually.
Working With Multiple AWS Profiles
If you manage multiple AWS accounts, use named profiles:
aws configure --profile myprofile
Then use that profile when running commands:
aws s3 ls --profile myprofile
This keeps credentials for different environments separate and clean.
Update AWS CLI on Windows
AWS releases updates regularly. To update, simply download the latest MSI and run it over the existing installation. The installer replaces the old version automatically.
To check your current version:
aws --version
To check the latest available version, visit the AWS CLI changelog on GitHub.
If you installed via winget, update with:
winget upgrade Amazon.AWSCLI
Uninstall AWS CLI on Windows
To remove AWS CLI, go to:
Settings > Apps > Installed Apps
Search for AWS Command Line Interface v2, click the three dots, and select Uninstall.
Alternatively, use Control Panel > Programs and Features and find AWS CLI there.
Your .aws folder in your user directory is not removed automatically. Delete it manually if you want to wipe all credentials and config.
Common Errors and Fixes
Error: aws is not recognized as a command
This means Windows cannot find the CLI in your PATH.
Fix:
- Search for Environment Variables in the Start menu
- Click Edit the system environment variables
- Under System Variables, find Path and click Edit
- Check if
C:\Program Files\Amazon\AWSCLIV2is listed - If not, click New and add it
- Click OK and restart your terminal
Error: Invalid AWS Access Key Id
Your credentials are wrong or expired.
Fix: Go to AWS IAM console, create a new access key, and run aws configure again.
Error: Could not connect to the endpoint URL
This is usually a region issue or a network/firewall problem.
Fix: Check your default region is set correctly with:
aws configure get region
If it is blank, set it:
aws configure set region us-east-1
Error: Access Denied
Your IAM user does not have permission for the action you are trying to perform.
Fix: Go to AWS IAM, find your user, and attach the appropriate policy (e.g., AmazonS3ReadOnlyAccess for reading S3).
Verify Everything Is Working
Run these commands one by one to confirm a healthy setup:
# Check CLI version
aws --version
# List S3 buckets
aws s3 ls
# Get your caller identity (confirms auth is working)
aws sts get-caller-identity
The sts get-caller-identity command is especially useful. It returns your account ID, user ID, and ARN. If this works, your credentials are valid and your CLI is fully functional.
Example output:
{
"UserId": "AIDAIOSFODNN7EXAMPLE",
"Account": "123456789012",
"Arn": "arn:aws:iam::123456789012:user/youruser"
}
Conclusion
Installing AWS CLI on Windows takes less than five minutes. Download the MSI, run it, run aws configure with your IAM credentials, and test with aws sts get-caller-identity. That is the complete process.
Once it is working, you can automate backups to S3, manage EC2 instances, deploy Lambda functions, and do far more than you could through the browser console alone. The CLI is a core skill for anyone working seriously with AWS.
Frequently Asked Questions
Do I need Python installed to use AWS CLI v2 on Windows?
No. AWS CLI version 2 includes a bundled Python runtime. You do not need to install Python separately. This was a requirement for CLI v1 but it is not needed for v2.
Can I install AWS CLI on Windows without admin rights?
The MSI installer requires administrator access. If you do not have it, ask your IT team. There is no official portable version, but you can manually extract the MSI and set your PATH, though this is not officially supported.
How do I know if I have AWS CLI v1 or v2?
Run aws --version. If the output shows aws-cli/2.x.x, you have v2. If it shows aws-cli/1.x.x, you have v1. For most modern workflows, v2 is recommended.
Where do I get my AWS Access Key ID and Secret Access Key?
Log into the AWS console, go to IAM > Users > Your User > Security Credentials, and create an access key. Download or copy both values immediately. AWS will not show the secret key again after you leave that page.
How do I switch between multiple AWS accounts on the same machine?
Use named profiles. Run aws configure --profile profilename for each account. Then pass --profile profilename with each command, or set the AWS_PROFILE environment variable to switch the default profile for your session.
- How to Fix Overscan on Windows 11/10: Stop Your Screen Getting Cut Off (2026) - April 1, 2026
- How to Disable Lock Screen on Windows 11/10 in 2026 - April 1, 2026
- Top 7 NFT Integration Ideas for Brands in 2026 - March 31, 2026
