My First AWS CLI Workflow: From Installation to My First S3 Command
A beginner-friendly walkthrough of setting up AWS CLI, configuring credentials safely, and using the CLI to interact with Amazon S3.
# My First AWS CLI Workflow: From Installation to Amazon S3
If you're starting your AWS journey, the **AWS Command Line Interface (AWS CLI)** is one of the most useful tools to learn.
Instead of navigating through the AWS Management Console for every task, the AWS CLI lets you interact with AWS services directly from your terminal.
In this article, I'll walk through a simple beginner-friendly workflow using **Amazon S3**.
## 1. Install AWS CLI
Start by installing the AWS CLI for your operating system.
After installation, open your terminal and verify that it works:
```bashaws --versionIf the installation was successful, the terminal should display the installed AWS CLI version.
2. Configure AWS CLI
The simplest way to configure the CLI is:
aws configureThe CLI will ask for:
- AWS Access Key ID
- AWS Secret Access Key
- Default AWS Region
- Default output format
For example:
AWS Access Key ID [None]: YOUR_ACCESS_KEYAWS Secret Access Key [None]: YOUR_SECRET_KEYDefault region name [None]: us-east-1Default output format [None]: json⚠️ Important Security Note
Never share your AWS access keys publicly or commit them to a GitHub repository.
For real projects, use appropriate AWS identity and credential-management approaches such as IAM roles or AWS IAM Identity Center whenever possible.
3. Verify Your Configuration
After configuring the CLI, check whether your credentials are working:
aws sts get-caller-identityIf everything is configured correctly, AWS will return information about the identity associated with your current credentials.
This is one of the most useful commands to remember because it quickly tells you which AWS identity you're currently authenticated as.
4. Try Amazon S3
Now let's interact with Amazon S3.
To list the S3 buckets accessible to your current identity:
aws s3 lsIf you already have an S3 bucket, you can view its contents:
aws s3 ls s3://YOUR-BUCKET-NAMEYou can also upload a file:
aws s3 cp example.txt s3://YOUR-BUCKET-NAME/Then verify that the file was uploaded:
aws s3 ls s3://YOUR-BUCKET-NAME/5. Why Learn AWS CLI?
Learning the AWS CLI gives you another way to work with AWS.
The AWS Management Console is excellent for visual exploration, but the CLI becomes especially powerful when you want to:
- Automate repetitive tasks
- Create scripts
- Work with AWS from a terminal
- Integrate AWS operations into development workflows
- Quickly test AWS services
- Manage cloud resources more efficiently
Once you're comfortable with individual commands, you can start combining them with shell scripts to automate larger workflows.
6. A Small Practice Challenge
If you're learning AWS CLI, try this exercise:
- Configure your AWS CLI.
- Verify your identity using
aws sts get-caller-identity.
- Create or use an S3 bucket.
- Upload a small text file.
- List the bucket contents.
- Download the file again.
- Delete your test objects when you're finished.
The goal isn't to memorize every AWS CLI command.
Instead, focus on understanding this basic workflow:
AWS service → operation → parameters → output
Once this mental model becomes familiar, learning additional AWS CLI commands becomes much easier.
Final Thoughts
AWS CLI can look intimidating when you first encounter the large number of available commands and options.
You don't need to learn everything at once.
Start with one AWS service, practice a few common operations, and gradually expand your knowledge.
Amazon S3 is a great starting point because its basic CLI operations are simple enough for beginners while still demonstrating how the AWS CLI can interact with real cloud resources.
What's the first AWS service you learned to use through the AWS CLI?
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article