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.
In this guide, we will consider the case when you already have an operating system with AWS CLI installed on it.
You can read more about how to install AWS CLI on macOS in 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.
Go to the “Users” section and click on the “Add users” button.
In the “User name” field, specify the username for the new user and check “Access key - Programmatic access”.
In this manual, “vladimir_mikhalev” will be used as the username.
Click on the “Next: Permissions” button.
Next, select “Attach existing policies directly”.
Select the “AdministratorAccess” policy and Click on the “Next: Tags” button.
In the next step, you do not have to make any changes.
Click on the “Next: Review” button.
Everything is ready to create a new user.
Click on the “Create user” button.
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.
Let’s configure AWS CLI with the command:
In the “AWS Access Key ID” field, specify the access key ID that you obtained earlier during user creation.
Press the “Enter” button.
In the “AWS Secret Access Key” field, specify the secret access key that you obtained earlier during user creation.
Press the “Enter” button.
In the “Default region name” field, specify the AWS region in which you are planning to work.
Press the “Enter” button.
In the “Default output format” field, specify “json” as a format.
Press the “Enter” button.
Everything is ready to use the AWS CLI.
Let’s list all EC2 instances with the command:
Please note that I have just one EC2 instance.
Now press the “q” button to close information about EC2 instances.
You can read more about how to install eksctl on macOS in my guide “Install eksctl on macOS”.
My Courses
🎓 Dive into my comprehensive IT courses designed for enthusiasts and professionals alike. Whether you’re looking to master Docker, conquer Kubernetes, or advance your DevOps skills, my courses provide a structured pathway to enhancing your technical prowess.
My Services
💼 Take a look at my service catalog and find out how we can make your technological life better. Whether it’s increasing the efficiency of your IT infrastructure, advancing your career, or expanding your technological horizons — I’m here to help you achieve your goals. From DevOps transformations to building gaming computers — let’s make your technology unparalleled!
Refill My Coffee Supplies
💖 PayPal
🏆 Patreon
💎 GitHub
🥤 BuyMeaCoffee
🍪 Ko-fi
Follow Me
🎬 YouTube
🐦 Twitter
🎨 Instagram
🐘 Mastodon
🧵 Threads
🎸 Facebook
🧊 Bluesky
🎥 TikTok
💻 LinkedIn
📣 daily.dev Squad
🧩 LeetCode
🐈 GitHub
Is this content AI-generated?
Nope! Each article is crafted by me, fueled by a deep passion for Docker and decades of IT expertise. While I employ AI to refine the grammar—ensuring the technical details are conveyed clearly—the insights, strategies, and guidance are purely my own. This approach may occasionally activate AI detectors, but you can be certain that the underlying knowledge and experiences are authentically mine.