๐ AWS CLI Setup & IAM Access Key Configuration

Table of contents

This beginner-friendly guide walks you through installing the AWS CLI, configuring it using IAM Access Keys, and verifying your setup by listing users via the command line.
๐ฆ Step 1: Install AWS CLI
๐ Follow the official AWS CLI installation guide
๐ Choose your Operating System:
Windows: Download
.msi
macOS: Download
.pkg
Linux: follow instructions below
๐ง Linux Installation (Manual)
# Remove old version (optional)
sudo yum remove awscli
# Download AWS CLI v2
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
# Unzip and install
unzip awscliv2.zip
sudo ./aws/install
๐ For more details, check the Full Linux Install Guide โ
โ Step 2: Verify Installation
Run:
aws --version
Successful output might look like:
aws-cli/2.28.1 Python/3.13.4 Windows/10 exe/AMD64
๐ Step 3: Create IAM Access Key
Navigate to:
IAM โ Users โ Select a User โ Security Credentials tab โ Access Keys โ Create Access Key
Then:
Select the use case for the access key
Click Create Access Key, then copy or download the
.csv
file containing your Access Key ID and Secret access key
โ๏ธ Step 4: Configure AWS CLI
Run:
aws configure
Youโll be prompted to enter:
AWS Access Key ID: YOUR_ACCESS_KEY
AWS Secret Access Key: YOUR_SECRET_KEY
Default region name: us-east-1
Default output format: json
To find the region name, click the dropdown near your AWS console username:
๐งช Step 5: Test Your Configuration
Run:
aws iam list-users
If configured correctly, youโll see a JSON output listing your IAM users:
๐ Summary
โ Task | โ๏ธ Status |
AWS CLI Installed | โ |
IAM Access Key Created | โ |
CLI Configured via aws configure | โ |
IAM Users Listed with CLI | โ |
๐ Pro Tips
Never expose your secret access key publicly.
Use
.env
or environment variables for secure access.For production environments, prefer IAM roles instead of long-term access keys.
๐งญ Missed Part 1? Click here to read โAWS IAM: Creating Users, Policies & MFAโ
๐ Next up: AWS EC2 Beginner Guide: Launch & Host a Web Server - Coming Soon
๐ฌ Got Feedback?
Got feedback or questions? Drop them below and follow along for more beginner-friendly AWS labs! is this good to go
Subscribe to my newsletter
Read articles from Rashmi directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Rashmi
Rashmi
Constantly curious, endlessly experimenting. Exploring frontend magic with Next.js, diving into cloud tech, and sharing what I learn through blogs and github.