Keyboard Shortcuts N Next post
P Previous post
S Save / unsave
R Read aloud
T Toggle theme
/ Focus search
Esc Close panels
🔥
Ready to read...
AWS CLI Cloud Computing Cloud Computing: From Zero to Production Module 2 — AWS Fundamentals

AWS CLI — Installation, Setup, and First Commands

Reviewed & accurate
AI Summary

What You Will Learn

Beginner

  • How to install the AWS CLI
  • How to configure credentials
  • Basic CLI commands

Installation

Terminalbash
# macOS
brew install awscli

# Windows
msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi

# Linux
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install

# Verify
aws --version

Configuration

Terminalbash
aws configure
# Enter:
# AWS Access Key ID: YOUR_KEY
# AWS Secret Access Key: YOUR_SECRET
# Default region: us-east-1
# Default output format: json
Where to get keys
Go to IAM -> Users -> Your User -> Security credentials -> Create access key. NEVER commit these to git.

First Commands

Terminalbash
# List S3 buckets
aws s3 ls

# List EC2 instances
aws ec2 describe-instances

# Get caller identity (who am I?)
aws sts get-caller-identity

Practical Exercise

Install the AWS CLI
Run aws configure with your keys
Run aws sts get-caller-identity — verify it works
Run aws s3 ls — list your S3 buckets

Key Takeaways

  • Install with brew (Mac), msi (Windows), or curl (Linux).
  • Configure with aws configure — needs access key + region.
  • Get keys from IAM -> Users -> Security credentials.
  • aws sts get-caller-identity verifies your setup.
  • NEVER commit access keys to git.
Previously: Lesson 09 covered the Console.
Today: You learned: Control AWS from the terminal.
Next: Lesson 11 launches your first EC2.
Test Your Knowledge
How did you find this?

Comments

Join the discussion! Sign in with your Google or Blogger account, or comment as Anonymous - no account needed. For quick questions, also reach me on Telegram @cytestch.

Comments