๐Ÿš€ AWS CLI Setup & IAM Access Key Configuration

RashmiRashmi
2 min read

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:

๐Ÿง 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 โ†’

OS Selection


โœ… 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

0
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.