← Back to Blogs

Getting Started with AWS CLI

A simple guide to setting up AWS CLI, running your first commands, and understanding why command-line cloud management matters.

While learning AWS, I started with the AWS Console (GUI) to understand how services work. But as I went deeper into DevOps, I realized that clicking buttons is not enough. That’s where the AWS CLI (Command Line Interface) comes in.

What changed for me: AWS CLI made cloud tasks feel repeatable and automatable instead of manual and slow.

What is AWS CLI?

AWS CLI allows us to interact with AWS services directly from the terminal. Everything we do in the AWS Console, like launching EC2, creating key pairs, or managing security groups, can also be done using commands.

Instead of navigating multiple screens, we can automate tasks using simple commands.

Why AWS CLI is Important

  • Faster than using the browser
  • Essential for automation and scripting
  • Used in CI/CD pipelines
  • Helps manage infrastructure programmatically

Setting Up AWS CLI

Step 1: Install AWS CLI

On Mac:

brew install awscli

On Windows:

choco install awscli

Step 2: Configure AWS CLI

After installation, we configure it using:

aws configure

This requires:

  • Access Key
  • Secret Access Key
  • Region, for example us-east-1
  • Output format, such as json

These keys are generated from an IAM user and must be kept secure.

Basic Commands I Tried

Check Identity

aws sts get-caller-identity

List EC2 Instances

aws ec2 describe-instances

The output is in JSON format and contains detailed information about the instances.

Using AI with AWS CLI

AWS also provides an AI assistant called Amazon Q. It helps generate CLI commands by simply describing what we want.

For example:

Create a key pair using AWS CLI

It provides the exact command, which makes learning and automation much easier.

Important Lesson

One key takeaway for me was:

Always learn how to do things manually first, then automate using CLI.

If you don’t understand the service, running commands blindly won’t help.

Security Note

AWS access keys must never be shared or uploaded to public repositories. If exposed, someone can misuse your account and generate unexpected costs.

Treat access keys like passwords. Store them carefully, rotate them when needed, and avoid hardcoding them in projects.

Final Thoughts

AWS CLI feels like the bridge between basic cloud usage and real DevOps practices. It allows us to move from manual work to automation, which is a core part of modern cloud engineering.

For me, learning CLI was not just about commands. It was about understanding how to control infrastructure programmatically.

Back to Blogs