570 words
3 min read

Configure AWS CLI

By · Docker Captain · CNCF Ambassador · IBM Champion
2022-11-08
2026-10-06
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.

CAUTION

Updated October 2026

This 2022 walkthrough creates a long-lived access key for an IAM user with AdministratorAccess. For anything beyond a personal lab, use IAM Identity Center with short-lived credentials (aws configure sso) and a least-privilege permission set instead.

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
    Restore Drills on a Clean Machine — Measured RTO for 47 Stacks, 19 Seconds to 7 Minutes
    DevOps & Cloud · Restore drills that measure RTO on a machine that never ran the stack, 47 templates weekly. Every same-host restore passed. The first clean one answered 500.
  2. 2
    Mutation Testing for Infrastructure Code — 153 Planted Bugs, Four Tests That Could Not Fail
    DevOps & Cloud · Mutation testing for infrastructure code, done by hand across fifteen repositories. 153 planted bugs, and four green tests that could never have failed.
  3. 3
    Docker Health Checks That Cannot Fail — Seventeen Hours Green
    DevOps & Cloud · A Docker health check whose pattern matches the shell running it can never go red. How to find the checks in your fleet that never failed, and prove each one.
  4. 4
    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.

Random Posts

Random
  1. 1
    Master Container Security in 2025 — Best Practices & Live Demo
    DevOps & Cloud · Master container security in 2025 with proven Docker & Kubernetes best practices. Learn how to automate scans using Docker Scout & Snyk with real demos.
  2. 2
    Install Confluence Using Docker Compose
    Self-Hosting · Learn how to install Confluence using Docker Compose with Traefik and Let's Encrypt. Step-by-step setup for secure, self-hosted Atlassian documentation.
  3. 3
    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.
  4. 4
    Install Rocket.Chat Using Docker Compose
    Self-Hosting · Step-by-step guide to install Rocket.Chat on Ubuntu Server using Docker Compose and Traefik with Let's Encrypt SSL. Ideal for secure team communication..
Configure AWS CLI
https://heyvaldemar.com/configure-aws-cli/
Author
Vladimir Mikhalev
Published
2022-11-08
Updated
2026-10-06
License
CC BY-NC-SA 4.0