This guide will walk you through the process of installing and configuring the AWS Command Line Interface (CLI) on Windows.
Download the AWS CLI MSI installer for Windows (64-bit) from the official AWS CLI website.
Run the downloaded MSI installer and follow the on-screen instructions.
After installation, open a new Command Prompt or PowerShell window to ensure the PATH is updated.
To verify that AWS CLI is installed correctly, open a new Command Prompt/PowerShell, and run the following command: aws --version
You should see output similar to:
aws-cli/2.x.y Python/3.x.y OS_NAME x86_64 OS_VERSION
Open a Terminal window.
Run the following command:
aws configure
You'll be prompted to enter four pieces of information:
AWS Access Key ID: Enter the access key from your IAM user
AWS Secret Access Key: Enter the secret key from your IAM user
Default region name: Go to this page aws regions and find the region closest to your users. Since this is a tutorial, choose and enter us-east-1 (AWS's oldest and most feature-complete region).
Default output format: Choose from json, yaml, text, table (json is recommended)
To verify that AWS CLI is configured correctly:
Run the following command: aws configure list
You should see output similar to:
Name Value Type Location ---- ----- ---- -------- profile <not set> None None access_key ****************ABCD shared-credentials-file secret_key ****************EFGH shared-credentials-file region us-west-2 config-file ~/.aws/config
Note: The access key and secret key will be partially hidden for security reasons.
To test if AWS CLI is working correctly:
Run a simple AWS command, such as listing your S3 buckets (Amazon Service for Object Storage):
aws s3 ls
If configured correctly, you'll either see a list of your S3 buckets or an empty response if you have no buckets.
By following these steps, you've successfully installed and configured the AWS CLI on your system. You can now use AWS services through the command line interface.