777 words
4 minutes

Configure AWS CLI

Cover image for Configure AWS CLI

This article is for those looking for a detailed and straightforward guide on configuring AWS CLI.

The AWS CLI is a single tool for managing AWS services. With just one tool download, you can control many AWS services from the command line and automate them with scripts.

IMPORTANT

In this guide, we will consider the case when you already have an operating system with AWS CLI installed on it.

For detailed instructions on installing the AWS CLI on macOS, see my guide: Install AWS CLI on macOS.

We need to create a new user and assign him an access policy. The user will be used to connect to AWS using AWS CLI.

Log in under your root account on AWS and search for “IAM” in the main search bar on top of the AWS dashboard.

Configure AWS CLI - Step 1

Go to the “Users” section and click on the “Add users” button.

Configure AWS CLI - Step 2

In the “User name” field, specify the username for the new user and check “Access key - Programmatic access”.

NOTE

In this manual, “vladimir_mikhalev” will be used as the username.

Click on the “Next: Permissions” button.

Configure AWS CLI - Step 3

Next, select “Attach existing policies directly”.

Select the “AdministratorAccess” policy and Click on the “Next: Tags” button.

Configure AWS CLI - Step 4

In the next step, you do not have to make any changes.

Click on the “Next: Review” button.

Configure AWS CLI - Step 5

Everything is ready to create a new user.

Click on the “Create user” button.

Configure AWS CLI - Step 6

The user has been successfully created and has the necessary permissions.

Now you need to save the received “Access key ID” and “Secret access key”.

Click on the “Show” button to display the contents of the “Secret access key” section and save the contents of the section to a safe place.

Click on the “Close” button.

Configure AWS CLI - Step 7

Let’s configure AWS CLI with the command:

Terminal window
aws configure

Configure AWS CLI - Step 8

In the “AWS Access Key ID” field, specify the access key ID that you obtained earlier during user creation.

Press the “Enter” button.

Configure AWS CLI - Step 9

In the “AWS Secret Access Key” field, specify the secret access key that you obtained earlier during user creation.

Press the “Enter” button.

Configure AWS CLI - Step 10

In the “Default region name” field, specify the AWS region in which you are planning to work.

Press the “Enter” button.

Configure AWS CLI - Step 11

In the “Default output format” field, specify “json” as a format.

Press the “Enter” button.

Configure AWS CLI - Step 12

Everything is ready to use the AWS CLI.

Let’s list all EC2 instances with the command:

Terminal window
aws ec2 describe-instances

Configure AWS CLI - Step 13

Please note that I have just one EC2 instance.

Configure AWS CLI - Step 14

Now press the “q” button to close information about EC2 instances.

For step-by-step instructions on installing eksctl on macOS, see my guide: Install eksctl on macOS.


Patreon Exclusives#

🏆 Join my Patreon and dive deep into the world of Docker and DevOps with exclusive content tailored for IT enthusiasts and professionals. As your experienced guide, I offer a range of membership tiers designed to suit everyone from newbies to IT experts.


Tools I Personally Trust#

If you’re building things, breaking things, and trying to keep your digital life a little saner (like every good DevOps engineer), these are two tools that I trust and use daily:

🛸 Proton VPN - My shield on the internet. It keeps your Wi-Fi secure, hides your IP, and blocks those creepy trackers. Even if I’m hacking away on free café Wi-Fi, I know I’m safe.

🔑 Proton Pass - My password vault. Proper on-device encryption, 2FA codes, logins, secrets - all mine and only mine. No compromises.

These are partner links - you won’t pay a cent more, but you’ll be supporting DevOps Compass. Thanks a ton - it helps me keep this compass pointing the right way 💜


Gear & Books I Trust#

📕 Essential DevOps books
🖥️ Studio streaming & recording kit
📡 Streaming starter kit


Social Channels#

🎬 YouTube
🐦 X (Twitter)
🎨 Instagram
🐘 Mastodon
🧵 Threads
🎸 Facebook
🦋 Bluesky
🎥 TikTok
💻 LinkedIn
📣 daily.dev Squad
✈️ Telegram
🐈 GitHub


Community of IT Experts#

👾 Discord


Refill My Coffee Supplies#

💖 PayPal
🏆 Patreon
🥤 BuyMeaCoffee
🍪 Ko-fi
💎 GitHub
Telegram Boost

🌟 Bitcoin (BTC): bc1q2fq0k2lvdythdrj4ep20metjwnjuf7wccpckxc
🔹 Ethereum (ETH): 0x76C936F9366Fad39769CA5285b0Af1d975adacB8
🪙 Binance Coin (BNB): bnb1xnn6gg63lr2dgufngfr0lkq39kz8qltjt2v2g6
💠 Litecoin (LTC): LMGrhx8Jsx73h1pWY9FE8GB46nBytjvz8g


Is this content AI-generated?

No. Every article on this blog is written by me personally, drawing on decades of hands-on IT experience and a genuine passion for technology.

I use AI tools exclusively to help polish grammar and ensure my technical guidance is as clear as possible. However, the core ideas, strategic insights, and step-by-step solutions are entirely my own, born from real-world work.

Because of this human-and-AI partnership, some detection tools might flag this content. You can be confident, though, that the expertise is authentic. My goal is to share road-tested knowledge you can trust.

Configure AWS CLI
https://www.heyvaldemar.com/configure-aws-cli/
Author
Vladimir Mikhalev
Published at
2022-11-08
License
CC BY-NC-SA 4.0