533 words
3 min read

Configure AWS CLI

By · Solutions Architect · Docker Captain · IBM Champion
Cover image for the post '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.

TIP

Architecture Context

Named CLI profiles work for individual developers managing multiple AWS accounts. For teams, AWS IAM Identity Center (SSO) provides centralized credential management with temporary session tokens. Choose named profiles for personal workflows and SSO for any environment where multiple engineers share account access or where compliance requires credential rotation and audit trails.

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.


Vladimir Mikhalev

Docker Captain  ·  IBM Champion  ·  AWS Community Builder

The Verdict — production-tested analysis on YouTube.

The Verdict

Inconvenient truths about shipping in the AI era

Container security, platform engineering, and the agentic shift — tested in production, argued without the hype. The verdict reaches your inbox the moment there's one worth sending.

Related Posts

Same category
  1. 1
    Terraform MCP server GA: the Apply Gate your auditor will ask about
    DevOps & Cloud · HashiCorp's Terraform MCP server is GA and IBM Bob can write production IaC. ENABLE_TF_OPERATIONS separates a safe assistant from autonomous apply.
  2. 2
    Docker supply chain hardening — from Scout D to OpenSSF 7.8 on a 730K-pull image
    DevOps & Cloud · How I hardened a 730K-pull public Docker image from Scout grade D to OpenSSF Scorecard 7.8. Multi-stage build, cosign signing, SLSA provenance, non-root default, and the incident that changed how I ship attestations.
  3. 3
    Cloudflare Web Analytics on Astro — Why Removing GA4 Unlocked Lighthouse 100
    DevOps & Cloud · How removing Google Analytics 4 from an Astro site unlocked Lighthouse 100, why Cloudflare Web Analytics replaced it, and what the tradeoffs actually cost.
  4. 4
    Platform Engineering — The Complete, Practical Guide to Building Internal Developer Platforms That Scale
    DevOps & Cloud · A deep, practical guide to Platform Engineering. Learn how to build internal developer platforms, golden paths, GitOps workflows, and scalable cloud foundations.

Random Posts

Random
  1. 1
    Install Docmost Using Docker Compose
    Self-Hosting · Learn how to install Docmost using Docker Compose with Traefik and Let's Encrypt. Step-by-step guide for self-hosting a modern documentation platform.
  2. 2
    The Intake Gate Your CISO Is Missing — 300 Million AI Chat Messages Were Public by Default
    AI & MLOps · Over half of AI-enabled apps on major backends carry severe misconfigurations. A hands-on analysis of the 300M-message Firebase breach, the insecure default that caused it, and the 3-layer Operational Discipline Protocol — with specific tooling — to shut down Agent Sprawl before regulators do it for you.
  3. 3
    Install Windows Server 2016
    SysAdmin & IT Pro · Learn how to install Windows Server 2016 step by step using official media. Get a stable, secure setup with the Desktop Experience.
  4. 4
    AI Didn't Fix Productivity. Measurement Did.
    Opinion & Culture · AI adoption is easy. Proving productivity isn't. A Docker Captain's view on why AI impact is hard to measure—and how teams can finally prove real value.
Configure AWS CLI
https://heyvaldemar.com/configure-aws-cli/
Author
Vladimir Mikhalev
Published
2022-11-08
License
CC BY-NC-SA 4.0